AccessListEntryView AccessListEntryView AccessListEntryView AccessListEntryView 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 AccessListEntryViewpublic sealed class AccessListEntryViewPublic NotInheritable Class AccessListEntryViewpublic sealed class AccessListEntryView
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

Size Size Size Size

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

public uint Size { get; }public uint Size { get; }Public ReadOnly Property Size As uintpublic uint Size { get; }
Value
uint uint uint uint

The number of entries.

Attributes

Methods

First() First() First() First()

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

public IIterator<AccessListEntry> First()public IIterator<AccessListEntry> First()Public Function First() As IIterator( Of AccessListEntry )public IIterator<AccessListEntry> First()
Returns

The first item.

Attributes

GetAt(UInt32) 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)public AccessListEntry GetAt(UInt32 index)Public Function GetAt(index As UInt32) As AccessListEntrypublic AccessListEntry GetAt(UInt32 index)
Parameters
index
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The

zero-based index of the storage item to retrieve.

Returns
Attributes

GetMany(UInt32, AccessListEntry[]) 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 uint GetMany(UInt32 startIndex, AccessListEntry[] items)public uint GetMany(UInt32 startIndex, AccessListEntry[] items)Public Function GetMany(startIndex As UInt32, items As AccessListEntry[]) As uintpublic uint GetMany(UInt32 startIndex, AccessListEntry[] items)
Parameters
startIndex
System.UInt32 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[] Windows.Storage.AccessCache.AccessListEntry[]

The items in the collection that start at startIndex.

Returns
uint uint uint uint

The number of items retrieved.

Attributes

IndexOf(AccessListEntry, UInt32) 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 bool IndexOf(AccessListEntry value, UInt32 index)public bool IndexOf(AccessListEntry value, UInt32 index)Public Function IndexOf(value As AccessListEntry, index As UInt32) As boolpublic bool IndexOf(AccessListEntry value, UInt32 index)
Parameters
index
System.UInt32 System.UInt32 System.UInt32 System.UInt32

The zero-based index of the storage item.

Returns
bool bool bool bool

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

Attributes