KnowledgeSyncProvider::IdFormats Property
When overridden in a derived class, gets the ID format schema of the provider.
Assembly: Microsoft.Synchronization (in Microsoft.Synchronization.dll)
The following example returns the ID format schema of a provider that uses change units.
// 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; } }
Show: