FieldSchema Class
Contains schema information that defines a custom field of an item in the metadata store.
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
The FieldSchema type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | FieldSchema(String, Type) | Initializes a new instance of the FieldSchema class that is based on the specified name and data type. |
![]() | FieldSchema(String, Type, UInt32) | Initializes a new instance of the FieldSchema class that is based on the specified name, data type, and the maximum length of the field. |
A set of custom fields can be defined for item metadata. Each field consists of a unique string name and a value. These fields can be used to store any additional metadata about an item that is not otherwise supported by the default set of item metadata. The fields can be accessed through various methods on ItemMetadata, such as GetByteField or SetCustomField. These fields and their format, including size and data type, are defined when the metadata store is initialized for a replica by using MetadataStore.InitializeReplicaMetadata.
The schema contains the length for the field value. For fixed-length fields, this value is the size of the data type in bytes. For variable-length fields, this value specifies the maximum length of the field in bytes.
