IndexSchema Constructor (IEnumerable<String>, Boolean)
Initializes a new instance of the IndexSchema class that contains the specified list of indexed field names and a value that indicates whether the index schema uniquely defines an item.
Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
Syntax
'Declaration
Public Sub New ( _
fieldNames As IEnumerable(Of String), _
isUnique As Boolean _
)
'Usage
Dim fieldNames As IEnumerable(Of String)
Dim isUnique As Boolean
Dim instance As New IndexSchema(fieldNames, _
isUnique)
public IndexSchema(
IEnumerable<string> fieldNames,
bool isUnique
)
public:
IndexSchema(
IEnumerable<String^>^ fieldNames,
bool isUnique
)
new :
fieldNames:IEnumerable<string> *
isUnique:bool -> IndexSchema
public function IndexSchema(
fieldNames : IEnumerable<String>,
isUnique : boolean
)
Parameters
- fieldNames
Type: System.Collections.Generic.IEnumerable<String>
The list of indexed field names.
- isUnique
Type: System.Boolean
true if this index schema uniquely identifies an item; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Any name in fieldNames is a null reference (Nothing in Visual Basic). |
ArgumentException | Any name in fieldNames is 0 length. |
ArgumentOutOfRangeException | fieldNames is 0 length. |
Remarks
The fields that are passed in fieldNames must also exist in the custom field schema that is defined for the replica.