共用方式為


IndexSchema 建構 (泛型 IEnumerable, Boolean)

初始化 IndexSchema 類別的新執行個體,這個執行個體包含索引欄位名稱的指定清單以及一個可指出此索引結構描述是否可唯一定義項目的值。

命名空間: Microsoft.Synchronization.MetadataStorage
組件: Microsoft.Synchronization.MetadataStorage (在 microsoft.synchronization.metadatastorage.dll)

語法

'宣告
Public Sub New ( _
    fieldNames As IEnumerable(Of String), _
    isUnique As Boolean _
)
'用途
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
)
public IndexSchema (
    IEnumerable<String> fieldNames, 
    boolean isUnique
)
public function IndexSchema (
    fieldNames : IEnumerable<String>, 
    isUnique : boolean
)

參數

  • fieldNames
    索引欄位名稱的清單。
  • isUnique
    如果此索引結構描述可唯一識別項目則為 true,否則為 false

例外

例外狀況型別 條件

ArgumentNullException

fieldNames 中的任何名稱為 null 參考 (在 Visual Basic 中為 Nothing)。

ArgumentException

fieldNames 中任何名稱的長度為 0。

ArgumentOutOfRangeException

fieldNames 的長度為 0。

備註

傳入 fieldNames 的欄位也必須存在於為此複寫所定義的自訂欄位結構描述中。

請參閱

參考

IndexSchema 類別
IndexSchema 成員
Microsoft.Synchronization.MetadataStorage 命名空間