Share via


IRuntimeHelper.FilterMetadataObjectsByProperty<T> Method (IEnumerable<T>, String, Object)

Gets the metadata objects from the given collection that contains a property with the given name and value.

Namespace:  Microsoft.BusinessData.Runtime
Assembly:  Microsoft.BusinessData (in Microsoft.BusinessData.dll)

Syntax

'Declaration
Function FilterMetadataObjectsByProperty(Of T As {Class, IMetadataObject}) ( _
    collection As IEnumerable(Of T), _
    propertyName As String, _
    propertyValue As Object _
) As T()
'Usage
Dim instance As IRuntimeHelper
Dim collection As IEnumerable(Of T)
Dim propertyName As String
Dim propertyValue As Object
Dim returnValue As T()

returnValue = instance.FilterMetadataObjectsByProperty(collection, _
    propertyName, propertyValue)
T[] FilterMetadataObjectsByProperty<T>(
    IEnumerable<T> collection,
    string propertyName,
    Object propertyValue
)
where T : class, IMetadataObject

Type Parameters

  • T
    The type of the metadata object.

Parameters

  • propertyName
    Type: System.String

    The name of the property to look for.

  • propertyValue
    Type: System.Object

    The value for the property to look for.

Return Value

Type: []
An array of metadata objects that contain the given property with the given value.

See Also

Reference

IRuntimeHelper Interface

IRuntimeHelper Members

FilterMetadataObjectsByProperty Overload

Microsoft.BusinessData.Runtime Namespace