IndexSchema.IsUnique Property
Gets a value that indicates whether this index schema uniquely identifies an item.
Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
Syntax
'Declaration
Public ReadOnly Property IsUnique As Boolean
Get
'Usage
Dim instance As IndexSchema
Dim value As Boolean
value = instance.IsUnique
public bool IsUnique { get; }
public:
property bool IsUnique {
bool get ();
}
member IsUnique : bool
function get IsUnique () : boolean
Property Value
Type: System.Boolean
true if this index schema uniquely identifies an item; otherwise, false.
Remarks
If an index schema is unique, querying on a specific set of values for the schema fields will yield at most a single item. Also, trying to add a second item to the metadata store that has the same set of values will result in an error.
An index schema must be defined as unique when the replica metadata is initialized so that later the index schema can use certain methods in the metadata storage service, such as ReplicaMetadata.FindItemMetadataByUniqueIndexedField.