SqlMetadataStore.GetReplicaMetadata Method
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)
public override ReplicaMetadata GetReplicaMetadata ( SyncIdFormatGroup idFormats, SyncId replicaId )
public ReplicaMetadata GetReplicaMetadata ( SyncIdFormatGroup idFormats, SyncId replicaId )
public override function GetReplicaMetadata ( idFormats : SyncIdFormatGroup, replicaId : SyncId ) : ReplicaMetadata
Parameters
- idFormats
The ID format schema for the provider.
- replicaId
The ID of the replica that is associated with this metadata.
Return Value
A replica metadata object that is used to access replica metadata in the metadata store.| Exception type | Condition |
|---|---|
|
This object has been disposed or was not initialized correctly. | |
|
idFormats or replicaId is a null reference (Nothing in Visual Basic). | |
|
The format of replicaId does not match the format specified in idFormats, or idFormats does not match the ID format schema that was used when the replica metadata was initialized. | |
|
The length of an ID specified by idFormats is more than 8000 bytes. | |
|
A metadata store has not been opened or created. | |
|
An instance of this replica metadata object is already active. | |
|
Replica metadata that has ID replicaId was not found. |
This method is used to access replica metadata that already exists in the metadata store. To create new replica metadata in a metadata store, use InitializeReplicaMetadata.
This method returns the implementation of the ReplicaMetadata abstract class that is provided by Metadata Storage Services. This abstract class can be used to access replica metadata that is stored in the Sync Framework database file.
To prevent applications from making concurrent conflicting updates to the metadata store, multiple outstanding instances of ReplicaMetadata for a particular replica ID are not allowed. Applications can access the same ReplicaMetadata object from multiple threads, but multiple processes cannot access the replica metadata at the same time. If an outstanding instance of ReplicaMetadata for a particular replica ID already exists, this method throws ReplicaMetadataInUseException.