Share via


IndexSchema Constructor (String, Boolean)

Initializes a new instance of the IndexSchema class that has the specified indexed field name and a value that indicates whether this index schema uniquely defines an item.

Namespace:  Microsoft.Synchronization.MetadataStorage
Assembly:  Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)

Syntax

'Declaration
Public Sub New ( _
    fieldName As String, _
    isUnique As Boolean _
)
'Usage
Dim fieldName As String
Dim isUnique As Boolean

Dim instance As New IndexSchema(fieldName, _
    isUnique)
public IndexSchema(
    string fieldName,
    bool isUnique
)
public:
IndexSchema(
    String^ fieldName, 
    bool isUnique
)
new : 
        fieldName:string * 
        isUnique:bool -> IndexSchema
public function IndexSchema(
    fieldName : String, 
    isUnique : boolean
)

Parameters

  • isUnique
    Type: System.Boolean
    true if this index schema uniquely identifies an item; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

fieldName is a null reference (Nothing in Visual Basic).

ArgumentException

fieldName is 0 length.

Remarks

The field passed in fieldName must also exist in the custom field schema that is defined for the replica.

See Also

Reference

IndexSchema Class

IndexSchema Overload

Microsoft.Synchronization.MetadataStorage Namespace