Access​List​Entry​View Access​List​Entry​View Access​List​Entry​View Class

Definition

A list of the entries that are in your app's most recently used list (MRU) (obtained from the static StorageApplicationPermissions.MostRecentlyUsedList property) and in your app's future-access list (obtained from the static StorageApplicationPermissions.FutureAccessList property).

public sealed class AccessListEntryView : IIterable, IVectorViewpublic sealed class AccessListEntryView : IEnumerable, IReadOnlyListPublic NotInheritable Class AccessListEntryView Implements IEnumerable, IReadOnlyList
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

To see more code examples that use this class, see the File access sample.

Collection member lists

For JavaScript, AccessListEntryView has the members shown in the member lists. In addition, AccessListEntryView supports a length property, members of Array.prototype, and using an index to access items.

Enumerating the collection in C# or Microsoft Visual Basic

AccessListEntryView is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<AccessListEntry> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable<T> with an AccessListEntry constraint.

Examples

The File access sample demonstrates how to enumerate entries in the MostRecentlyUsedList.

AccessListEntryView entries = StorageApplicationPermissions.MostRecentlyUsedList.Entries;
if (entries.Count > 0)
{
    foreach (AccessListEntry entry in entries)
    {
        StringBuilder outputText = new StringBuilder("The MRU list contains the following item(s):" + Environment.NewLine + Environment.NewLine);
        outputText.AppendLine(entry.Metadata);
    }
}
else
{
    // Handle empty list
}
var entries = Windows.Storage.AccessCache.StorageApplicationPermissions.mostRecentlyUsedList.entries;
if (entries.size > 0) {
    var outputText = "The MRU list contains the following item(s):<br/><br/>";
    mruEntries.forEach(function (entry) {
        mruOutputText += entry.metadata + "<br/>"; // Application previously chose to store sampleFile.name in this field
    });
} else {
    // Handle empty list
}

Properties

Item[Int32] Item[Int32] Item[Int32]

Gets the element at the specified index in the read-only list.

This member is not implemented in C++T this[int index] { get; }ReadOnly Property Item(index As Integer) As T
Parameters
index
System.Int32 System.Int32 System.Int32

The zero-based index of the element to get.

Value
T T T

The element at the specified index in the read-only list.

Attributes

Size Size Size

Gets the number of storage items in the access list or most recently used (MRU) list.

public unsigned short Size { get; }This member is not implemented in C#This member is not implemented in VB.Net
Value
uint uint uint

The number of entries.

Attributes

Methods

First() First() First()

Retrieves the first storage item from the access list or most recently used (MRU) list.

public IIterator<AccessListEntry> First()This member is not implemented in C#This member is not implemented in VB.Net
Returns

The first item.

Attributes

GetAt(UInt32) GetAt(UInt32) GetAt(UInt32)

Retrieves the storage item at the specified index in the access list or most recently used (MRU) list.

public AccessListEntry GetAt(UInt32 index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
System.UInt32 System.UInt32 System.UInt32

The

zero-based index of the storage item to retrieve.

Returns
Attributes

GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

This member is not implemented in C++IEnumerator<T> GetEnumerator()Function GetEnumerator As IEnumerator(Of T)
Returns
System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerator<T>

An enumerator that can be used to iterate through the collection.

Attributes
See Also
System.Collections.Generic.IEnumerator<T>System.Collections.Generic.IEnumerator<T>System.Collections.Generic.IEnumerator<T>

GetMany(UInt32, AccessListEntry[]) GetMany(UInt32, AccessListEntry[]) GetMany(UInt32, AccessListEntry[])

Retrieves the storage items that start at the specified index in the access list or most recently used (MRU) list.

public unsigned short GetMany(UInt32 startIndex, AccessListEntry[] items)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
startIndex
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the start of the items in the collection to retrieve.

items
Windows.Storage.AccessCache.AccessListEntry[] Windows.Storage.AccessCache.AccessListEntry[] Windows.Storage.AccessCache.AccessListEntry[]

The items in the collection that start at startIndex.

Returns
uint uint uint

The number of items retrieved.

Attributes

IndexOf(AccessListEntry, UInt32) IndexOf(AccessListEntry, UInt32) IndexOf(AccessListEntry, UInt32)

Retrieves the index of the specified storage item in the access list or most recently used (MRU) list.

public PlatForm::Boolean IndexOf(AccessListEntry value, UInt32 index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the storage item.

Returns
bool bool bool

True if the specified storage item exists in the list; otherwise false.

Attributes