Search Results for

    Show / Hide Table of Contents

    Class LevelLocation

    Represents a location inside an IAbstractMarkupDataContainer.

    Inheritance
    System.Object
    LevelLocation
    Implements
    System.ICloneable
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
    Assembly: Sdl.FileTypeSupport.Framework.Core.dll
    Syntax
    public class LevelLocation : ICloneable
    Remarks

    The Parent property specifies the parent container, and the Index property represents the item index in the container. An index of 0 indicates a position between the first item in the parent, and an index of Parent.Count indicates a position after the last item.

    If you need to refer to an item in a nested container, use a Location instead.

    Since the position includes an index into the parent, if the content of the parent changes (e.g. new items are inserted, or existing ones removed or replaced), the position may no longer point to the same item.

    Use a location marker instead if you need to refer to a specific location that may change as part of operations on the data.

    Constructors

    LevelLocation()

    Creates an uninitialized object.

    Declaration
    public LevelLocation()

    LevelLocation(IAbstractMarkupDataContainer, Int32)

    Creates from specific parent and index values.

    Declaration
    public LevelLocation(IAbstractMarkupDataContainer parent, int index)
    Parameters
    Type Name Description
    IAbstractMarkupDataContainer parent
    System.Int32 index

    LevelLocation(LevelLocation)

    Creates from the values used in another object.

    Declaration
    public LevelLocation(LevelLocation other)
    Parameters
    Type Name Description
    LevelLocation other

    Properties

    Index

    The index in the parent collection that defines the location.

    Index 0 refers to the location before the first item in the collection. The index Parent.Count indicates a location after the last item in the collection.

    Declaration
    public int Index { get; set; }
    Property Value
    Type Description
    System.Int32

    IsAtEndOfParent

    True if the location is valid and refers to the position after the last item in the parent

    Declaration
    public bool IsAtEndOfParent { get; }
    Property Value
    Type Description
    System.Boolean

    IsAtStartOfParent

    True if the location is valid and refers to the first item in the parent

    Declaration
    public bool IsAtStartOfParent { get; }
    Property Value
    Type Description
    System.Boolean

    IsValid

    The location is valid if the parent is set, and the index is a value within the range: 0 <= index <= Parent.Content.Count

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    System.Boolean

    ItemAtLocation

    Returns the item with the same index in the parent collection as the Index of this location, or null if there is no item with that index (e.g. if the index indicates a position after the last item in the collection).

    Declaration
    public IAbstractMarkupData ItemAtLocation { get; }
    Property Value
    Type Description
    IAbstractMarkupData

    Parent

    The container that this location refers to a position inside.

    Declaration
    public IAbstractMarkupDataContainer Parent { get; set; }
    Property Value
    Type Description
    IAbstractMarkupDataContainer

    Methods

    Clone()

    Create a shallow clone.

    Declaration
    public object Clone()
    Returns
    Type Description
    System.Object

    Equals(Object)

    Compares all properties.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Calculated from index and parent properties

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    ToString()

    Overridden to provide more intuitive information for use in the debugger

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    Implements

    System.ICloneable

    On this page

    • Constructors
      • LevelLocation()
      • LevelLocation(IAbstractMarkupDataContainer, Int32)
      • LevelLocation(LevelLocation)
    • Properties
      • Index
      • IsAtEndOfParent
      • IsAtStartOfParent
      • IsValid
      • ItemAtLocation
      • Parent
    • Methods
      • Clone()
      • Equals(Object)
      • GetHashCode()
      • ToString()
    • Implements
    Back to top Generated by DocFX