| Location Class |
Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
The Location type exposes the following members.
| Name | Description | |
|---|---|---|
| Location |
Default constructor
| |
| Location(LevelLocation) |
Initializes the location with one level only.
This generates a location that is equivalent to the passed-in LevelLocation.
| |
| Location(Location) |
Creates a deep clone
| |
| Location(IAbstractMarkupDataContainer, IAbstractMarkupData) |
Creates a location that corresponds to the position of the item with regards to the
specified root container.
| |
| Location(IAbstractMarkupDataContainer, Boolean) |
Initialize the location to the first or last position in the specified root container.
|
| Name | Description | |
|---|---|---|
| BottomLevel |
Quick access to the most specific level
| |
| Depth |
Returns the number of levels in the location.
| |
| IsAtEnd | ||
| IsAtStart | ||
| IsValid |
True if all levels are valid locations and each
level corresponds to the location defined in the parent layer.
| |
| ItemAtLocation |
Returns the item at the location specified by the bottom level.
If the location is not valid, or if there is not item at the location
(i.e. if it is a location after the last element in a collection), this
property returns null.
| |
| Levels |
Provides access to the actual collection of levels that this location represents.
|
| Name | Description | |
|---|---|---|
| Clone |
Creates a deep clone of this object.
| |
| Equals |
Returns true if this location refers to the same position as the other location.
(Overrides ObjectEquals(Object).) | |
| GetHashCode |
Returns the hash code of the levels in this location.
(Overrides ObjectGetHashCode.) | |
| MoveFirstChild |
Changes the location to refer to the position just before the first child node
of the item at the current location.
If no child node is available (i.e. the current location does not refer to a
node that is an IAbstractMarkupDataContainer), the location is not changed, and
this method returns false.
Note that if the item at the current location is a container, but it has
no content, the location is still advanced to a location at the index 0 inside
the collection, as it is possible to insert new content there.
| |
| MoveLastChild |
Changes the location to just behind the last child node of the item
at the current location.
If no child node is available (i.e. the current location does not refer to a
node that is an IAbstractMarkupDataContainer), the location is not changed, and
this method returns false.
Note that if the item at the current location is a container, but it has
no content, the location is still advanced to a location at the index 0 inside
the collection, as it is possible to insert new content there.
| |
| MoveNext |
Advances to the next possible location. This will move to
the next available position according to the following priority list:
| |
| MoveNextSibling |
Advance the location to the next sibling position in the current bottom layer.
If no next sibling position is available (i.e. the location is already behind the
last item in the parent collection), the location is not changed, and this method
returns false.
| |
| MoveParent |
Changes the location to refer to the position just before the parent of the current
bottom level location.
If no parent location is available (i.e. the location is already in the top layer),
the location is not changed, and this method returns false.
| |
| MovePrevious |
Moves the location to the preceding available position according to the following priority list:
| |
| MovePreviousSibling |
Moves the location to the preceding sibling position in the current bottom layer.
If no previous sibling location is available (i.e. the current location is already
at the start of the parent collection), the location is not changed, and this method
returns false.
| |
| ToString |
Overridden to provide more useful information while debugging
(Overrides ObjectToString.) |
The parent in the top level location (index 0) is the root container (often IParagraph or ISegment). The BottomLevel is the location in the lowest level.