Click or drag to resize
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.BilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntax
Location Find(
	Predicate<Location> match
)

Parameters

match
Type: SystemPredicateLocation
Delegate that returns true when a matching location has been found

Return Value

Type: Location
The 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
Community
Edit

Be the first to Edit the community content of this topic.
Comments