共用方式為


IdFormats 屬性

在衍生類別中覆寫時,會取得此提供者的識別碼格式結構描述。

命名空間:  Microsoft.Synchronization
組件:  Microsoft.Synchronization (在 Microsoft.Synchronization.dll 中)

語法

'宣告
Public MustOverride ReadOnly Property IdFormats As SyncIdFormatGroup
    Get
'用途
Dim instance As KnowledgeSyncProvider
Dim value As SyncIdFormatGroup

value = instance.IdFormats
public abstract SyncIdFormatGroup IdFormats { get; }
public:
virtual property SyncIdFormatGroup^ IdFormats {
    SyncIdFormatGroup^ get () abstract;
}
abstract IdFormats : SyncIdFormatGroup
abstract function get IdFormats () : SyncIdFormatGroup

屬性值

型別:Microsoft.Synchronization. . :: . .SyncIdFormatGroup
提供者的識別碼格式結構描述。

範例

下列範例會傳回使用變更單位之提供者的識別碼格式結構描述。

// Gets the ID format schema that is defined for this replica.
public override SyncIdFormatGroup IdFormats
{
    get 
    {
        SyncIdFormatGroup FormatGroup = new SyncIdFormatGroup();

        // Change unit IDs are an enumeration, so they are fixed length and contain one byte.
        FormatGroup.ChangeUnitIdFormat.IsVariableLength = false;
        FormatGroup.ChangeUnitIdFormat.Length = sizeof(byte);

        // Item IDs are of SyncGlobalId type, so they are fixed length and contain a ulong prefix plus a Guid.
        FormatGroup.ItemIdFormat.IsVariableLength = false;
        FormatGroup.ItemIdFormat.Length = (ushort)(sizeof(ulong) + Marshal.SizeOf(typeof(Guid)));

        // Replica IDs are the absolute path to the item store, so they are variable length with maximum
        // length equal to the maximum length of a path.
        FormatGroup.ReplicaIdFormat.IsVariableLength = true;
        FormatGroup.ReplicaIdFormat.Length = 260 * sizeof(char);

        return FormatGroup;
    }
}

請參閱

參考

KnowledgeSyncProvider類別

KnowledgeSyncProvider 成員

Microsoft.Synchronization 命名空間