| IAbstractMarkupDataContainerFind Method (PredicateLocation) |
Returns the first location that matches the specified predecate.
The iteration is performed over all locations in this collection and all sub-collections until
the element 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)
SyntaxLocation Find(
Predicate<Location> match
)
Function Find (
match As Predicate(Of Location)
) As Location
Location^ Find(
Predicate<Location^>^ match
)
abstract Find :
match : Predicate<Location> -> Location
Parameters
- match
- Type: SystemPredicateLocation
Delegate that returns true when a matching location has been found
Return Value
Type:
LocationThe first location that matches the specified predicate
If no corresponding location is found, null is returned.
Examples
This example shows how this can be used to find the location of an equivalent item inside a paragraph.
Location GetEquivalentItemLocation(IAbstractMarkupData equalItem, IParagraph para)
{
return para.Find(
delegate(Location location)
{
return equalItem.Equals(location.ItemAtLocation);
});
}
See Also
Comments