ReplicaMetadata.FindItemMetadataByIndexedFields Method
When overridden in a derived class, returns a list of item metadata entries that have the specified values for the set of indexed fields.
Assembly: Microsoft.Synchronization.MetadataStorage (in Microsoft.Synchronization.MetadataStorage.dll)
public abstract IEnumerable<ItemMetadata> FindItemMetadataByIndexedFields( IEnumerable<KeyValuePair<string, Object>> fields )
Parameters
- fields
- Type: System.Collections.Generic.IEnumerable<KeyValuePair<String, Object>>
The set of indexed fields that identifies the items for which to search. The fields must be valid fields and represent an index.
Return Value
Type: System.Collections.Generic.IEnumerable<ItemMetadata>A list of item metadata entries that have the specified values for the set of indexed fields. When no items exist, an empty collection is returned.
| Exception | Condition |
|---|---|
| ObjectDisposedException | The object has been disposed or was not initialized correctly. |
| ArgumentNullException | fields is a null, or any name or value in fields is a null. |
| ArgumentException | Any field name in fields is 0 length, or any string type value in fields is 0 length. |
| NotSupportedException | Any field in fields is of an unsupported type. |
| MetadataFieldNotFoundException | fieldName was not found or is not valid. |
Custom fields must be established when the replica metadata is first initialized by passing FieldSchema to InitializeReplicaMetadata.
Index fields must be established when the replica metadata is first initialized by passing IndexSchema to InitializeReplicaMetadata.
Show: