Share via


ReplicaMetadata.FindItemMetadataByIndexedField Method

When overridden in a derived class, returns a list of item metadata entries that have the specified value for the indexed field.

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

Syntax

'Declaration
Public MustOverride Function FindItemMetadataByIndexedField ( _
    fieldName As String, _
    fieldValue As Object _
) As IEnumerable(Of ItemMetadata)
'Usage
Dim instance As ReplicaMetadata
Dim fieldName As String
Dim fieldValue As Object
Dim returnValue As IEnumerable(Of ItemMetadata)

returnValue = instance.FindItemMetadataByIndexedField(fieldName, _
    fieldValue)
public abstract IEnumerable<ItemMetadata> FindItemMetadataByIndexedField(
    string fieldName,
    Object fieldValue
)
public:
virtual IEnumerable<ItemMetadata^>^ FindItemMetadataByIndexedField(
    String^ fieldName, 
    Object^ fieldValue
) abstract
abstract FindItemMetadataByIndexedField : 
        fieldName:string * 
        fieldValue:Object -> IEnumerable<ItemMetadata> 
public abstract function FindItemMetadataByIndexedField(
    fieldName : String, 
    fieldValue : Object
) : IEnumerable<ItemMetadata>

Parameters

  • fieldName
    Type: System.String
    The name of the indexed field. The field must be a valid field and an index field.

Return Value

Type: System.Collections.Generic.IEnumerable<ItemMetadata>
A list of item metadata entries that have the specified value for the indexed field. An empty collection is returned when no items exist.

Exceptions

Exception Condition
ObjectDisposedException

The object has been disposed or was not initialized correctly.

ArgumentNullException

fieldName or fieldValue is a null reference (Nothing in Visual Basic).

ArgumentException

fieldName is 0 length, or fieldValue is both a string type and 0 length.

NotSupportedException

fieldValue is of an unsupported type.

MetadataFieldNotFoundException

fieldName was not found or is not valid.

Remarks

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.

See Also

Reference

ReplicaMetadata Class

Microsoft.Synchronization.MetadataStorage Namespace