Compartir a través de


StorageLibraryLastChangeId.Unknown Propiedad

Definición

Se devuelve cuando el diario usn se desborda y el servicio no puede mantenerse al día con los cambios o hay otra razón por la que no se puede calcular el identificador de cambio.

public:
 static property unsigned long long Unknown { unsigned long long get(); };
static uint64_t Unknown();
public static ulong Unknown { get; }
var uInt64 = StorageLibraryLastChangeId.unknown;
Public Shared ReadOnly Property Unknown As ULong

Valor de propiedad

UInt64

unsigned long long

uint64_t

No se puede calcular un identificador único de solo lectura que indique el identificador de cambio.

Ejemplos

// applications are expected to persist the previous value
UINT64 appsLastPersistedChangeId = StorageLibraryLastChangeId::Unknown();
StorageFolder folder = StorageFolder::GetFolderFromPathAsync(L"my folder path").get();

StorageLibraryChangeTracker tracker = folder.TryGetChangeTracker();
if (tracker != nullptr)
{
StorageLibraryChangeTrackerOptions ops;
ops.TrackChangeDetails(false);
tracker.Enable(ops);

StorageLibraryChangeReader reader = tracker.GetChangeReader();
if (reader != nullptr)
{
    UINT32 changeId = reader.GetLastChangeId();
    if ((changeId == StorageLibraryLastChangeId::Unknown())
    {
        ScanFolderSlow();
    }
    else if (changeId == 0)
    {
        // no changes in the storage folder yet, OR nothing has changed
        ProcessNormalApplicationStartup();
    }
    else if (changeId != appsLastPersistedChangeId)
    {
        // There have been new changes since we’ve last ran, process them
        appsLastPersistedChangeId = changeId;
        ScanFolderForChanges();
    }
    else
    {
        // changeId and our last persisted change id match, also normal application startup
        ProcessNormalApplicationStartup();
    }
}
}

Se aplica a

Consulte también