ItemMetadata Class

When overridden, represents the metadata that is associated with an item in the synchronization scope.

Inheritance Hierarchy

System.Object
  Microsoft.Synchronization.MetadataStorage.ItemMetadata

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

Syntax

'Declaration
Public MustInherit Class ItemMetadata
'Usage
Dim instance As ItemMetadata
public abstract class ItemMetadata
public ref class ItemMetadata abstract
[<AbstractClassAttribute>]
type ItemMetadata =  class end
public abstract class ItemMetadata

The ItemMetadata type exposes the following members.

Constructors

  Name Description
Protected method ItemMetadata Initializes a new instance of the ItemMetadata class.

Top

Properties

  Name Description
Public property ChangeVersion When overridden in a derived class, gets or sets the version of the most recent change made to the item.
Public property CreationVersion When overridden in a derived class, gets or sets the creation version for the item.
Public property GlobalId When overridden in a derived class, gets the global ID of the item.
Public property IsDeleted When overridden in a derived class, gets or sets a value that indicates whether the item has been deleted from the item store.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetByteField When overridden in a derived class, gets the value of the specified custom field.
Public method GetBytesField When overridden in a derived class, gets the value of the specified custom field.
Public method GetChangeUnitEnumerator When overridden in a derived class, returns an object that can be used to enumerate the change units that are contained in this item.
Public method GetChangeUnitVersion When overridden in a derived class, gets the version of a change unit that is contained in the item.
Public method GetGuidField When overridden in a derived class, gets the value of the specified custom field.
Public method GetHashCode (Inherited from Object.)
Public method GetMergeWinnerId When overridden in a derived class, gets the item ID that is used to identify the merged item in the synchronization community.
Public method GetStringField When overridden in a derived class, gets the value of the specified custom field.
Public method GetType (Inherited from Object.)
Public method GetUInt16Field When overridden in a derived class, gets the value of the specified custom field.
Public method GetUInt32Field When overridden in a derived class, gets the value of the specified custom field.
Public method GetUInt64Field When overridden in a derived class, gets the value of the specified custom field.
Public method MarkAsDeleted When overridden in a derived class, marks an item as deleted from the item store.
Protected method MemberwiseClone (Inherited from Object.)
Public method ResurrectDeletedItem When overridden in a derived class, restores an item that was previously marked as deleted in the metadata store.
Public method SetChangeUnitVersion When overridden in a derived class, sets the version of a change unit that is contained in this item.
Public method SetCustomField(String, Byte) When overridden in a derived class, sets the value of the specified custom field.
Public method SetCustomField(String, Byte[]) When overridden in a derived class, sets the value of the specified custom field.
Public method SetCustomField(String, Guid) When overridden in a derived class, sets the value of the specified custom field.
Public method SetCustomField(String, String) When overridden in a derived class, sets the value of the specified custom field.
Public method SetCustomField(String, UInt16) When overridden in a derived class, sets the value of the specified custom field.
Public method SetCustomField(String, UInt32) When overridden in a derived class, sets the value of the specified custom field.
Public method SetCustomField(String, UInt64) When overridden in a derived class, sets the value of the specified custom field.
Public method SetMergeWinnerIdOnDeletedItem When overridden in a derived class, sets the winning item ID on a merge tombstone.
Public method ToString (Inherited from Object.)

Top

Remarks

The metadata for an item contains its creation version, its current version, its global ID, and a value that indicates whether the item has been deleted from the item store. The metadata can also contain custom fields as defined by the FieldSchema class that is used to initialize the replica metadata.

Metadata Storage Service implements ItemMetadata. To obtain an instance of this implementation of ItemMetadata, first create a SqlMetadataStore object. Then, create or get a ReplicaMetadata object, and then call CreateItemMetadata or ReplicaMetadata.FindItemMetadataById.

The Metadata Storage Service implementation of this class does not save property changes to the disk until the object is passed to SaveItemMetadata.

Notes to Inheritors

When you inherit from ItemMetadata, you must override all its members.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Synchronization.MetadataStorage Namespace

Other Resources

Accessing Replica Metadata