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
collection
Type: System.Collections.Generic.IEnumerable<T>The collection of metadata objects.
propertyName
Type: System.StringThe name of the property to look for.
propertyValue
Type: System.ObjectThe value for the property to look for.
Return Value
Type: []
An array of metadata objects that contain the given property with the given value.