| IAbstractMarkupDataContainerFind Method (PredicateIAbstractMarkupData) |
Returns the first item that matches the specified predecate.
The iteration is performed over all items and sub-items in this collection and all sub-collections until
the item is located.
Namespace: Sdl.FileTypeSupport.Framework.BilingualApiAssembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
SyntaxIAbstractMarkupData Find(
Predicate<IAbstractMarkupData> match
)
Function Find (
match As Predicate(Of IAbstractMarkupData)
) As IAbstractMarkupData
IAbstractMarkupData^ Find(
Predicate<IAbstractMarkupData^>^ match
)
abstract Find :
match : Predicate<IAbstractMarkupData> -> IAbstractMarkupData
Parameters
- match
- Type: SystemPredicateIAbstractMarkupData
Delegate that returns true when a matching item has been found
Return Value
Type:
IAbstractMarkupDataThe first item that matches the specified predicate
If no corresponding item is found, null is returned.
Examples
The following example shows how this can be used (with an anonymous method) to find the an equivalent item inside a paragraph.
IAbstractMarkupData GetEquivalentItem(IAbstractMarkupData equalItem, IParagraph para)
{
return para.Find(
delegate(IAbstractMarkupData item)
{
return equalItem.Equals(item);
});
}
See Also
Comments