Share via


ReplicaMetadata.ProviderVersion Property

When overridden in a derived class, gets or sets the version of the provider that operates on this metadata.

Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)

Syntax

'Declaration
Public MustOverride Property ProviderVersion As UInteger
'Usage
Dim instance As ReplicaMetadata
Dim value As UInteger

value = instance.ProviderVersion

instance.ProviderVersion = value
public abstract uint ProviderVersion { get; set; }
public:
virtual property unsigned int ProviderVersion {
    unsigned int get () abstract;
    void set (unsigned int value) abstract;
}
/** @property */
public abstract UInt32 get_ProviderVersion ()

/** @property */
public abstract void set_ProviderVersion (UInt32 value)
public abstract function get ProviderVersion () : uint

public abstract function set ProviderVersion (value : uint)

Property Value

The version of the provider that operates on this metadata.

Remarks

The provider version is used to negotiate compatibility with other versions of a provider. Consider the following scenario:

  • There are three versions of a provider (v1, v2, and v3).

  • In v2, an incompatible change was made to the custom schema for the provider.

  • v2 and v3 are compatible.

A v3 provider can specify a value of v2 to ProviderVersion. A v2 or v3 provider can then verify the provider version required to operate on the metadata by using ProviderVersion. Because this value is serialized as part of the canonical format of the metadata store, the provider version can also be verified when the metadata is deserialized, by specifying a value of v2 for the expectedProviderCompatibilityVersion parameter of DeserializeReplicaMetadata. The v1 provider would expect a value of v1, and deserialization would fail by design because the metadata is incompatible with v1.

Use the lowest version possible to assure the highest level of compatibility with other versions of the same provider.

See Also

Reference

ReplicaMetadata Class
ReplicaMetadata Members
Microsoft.Synchronization.MetadataStorage Namespace