/// <summary> /// Initializes a new instance of the <see cref="MemoryIndex"/> class from the given parent index and /// adds new index segment at the end of the memory path. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="indexSegment">The index segment.</param> protected MemoryIndex(MemoryIndex parentIndex, IndexSegment indexSegment) { CallLevel = parentIndex.CallLevel; List <IndexSegment> path = new List <IndexSegment>(parentIndex.MemoryPath); path.Add(indexSegment); MemoryPath = new ReadOnlyCollection <IndexSegment>(path); }
/// <summary> /// Initializes a new instance of the <see cref="MemoryIndex"/> class with single index in memory path. /// </summary> /// <param name="indexSegment">First index in memory path.</param> /// <param name="callLevel">The call level.</param> protected MemoryIndex(IndexSegment indexSegment, int callLevel) { CallLevel = callLevel; List <IndexSegment> path = new List <IndexSegment>(); path.Add(indexSegment); MemoryPath = new ReadOnlyCollection <IndexSegment>(path); }
/// <summary> /// Determines whether the specified <see cref="System.Object" />, is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>. /// </returns> public override bool Equals(object obj) { IndexSegment otherPath = obj as IndexSegment; if (otherPath == null || otherPath.IsAny != this.IsAny) { return(false); } if (!IsAny) { return(otherPath.Name.Equals(this.Name)); } return(true); }
/// <summary> /// Initializes a new instance of the <see cref="TemporaryIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="pathName">Name of the path.</param> public TemporaryIndex(TemporaryIndex parentIndex, IndexSegment pathName) : base(parentIndex, pathName) { rootId = parentIndex.rootId; }
/// <summary> /// Initializes a new instance of the <see cref="VariableIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="pathName">Name of the path.</param> public VariableIndex(VariableIndex parentIndex, IndexSegment pathName) : base(parentIndex, pathName) { }
/// <summary> /// Initializes a new instance of the <see cref="VariableIndex"/> class. /// </summary> /// <param name="root">The root.</param> /// <param name="callLevel">The call level.</param> public VariableIndex(IndexSegment root, int callLevel) : base(root, callLevel) { }
/// <summary> /// Initializes a new instance of the <see cref="ObjectIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="pathName">Name of the path.</param> public ObjectIndex(ObjectIndex parentIndex, IndexSegment pathName) : base(parentIndex, pathName) { Object = parentIndex.Object; }
/// <summary> /// Initializes a new instance of the <see cref="ObjectIndex"/> class. /// </summary> /// <param name="obj">The object.</param> /// <param name="pathName">Name of the path.</param> public ObjectIndex(ObjectValue obj, IndexSegment pathName) : base(pathName, Snapshot.GLOBAL_CALL_LEVEL) { Object = obj; }
/// <summary> /// Initializes a new instance of the <see cref="NamedIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="callLevel">The call level.</param> protected NamedIndex(NamedIndex parentIndex, int callLevel) : base(parentIndex.MemoryPath, callLevel) { MemoryRoot = parentIndex.MemoryRoot; }
/// <summary> /// Initializes a new instance of the <see cref="NamedIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="path">The path.</param> protected NamedIndex(NamedIndex parentIndex, List <IndexSegment> path) : base(path, parentIndex.CallLevel) { MemoryRoot = parentIndex.MemoryRoot; }
/// <summary> /// Initializes a new instance of the <see cref="NamedIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="pathName">Name of the path.</param> protected NamedIndex(NamedIndex parentIndex, IndexSegment pathName) : base(parentIndex, pathName) { MemoryRoot = parentIndex.MemoryRoot; }
/// <summary> /// Initializes a new instance of the <see cref="NamedIndex"/> class. /// </summary> /// <param name="root">The root.</param> /// <param name="callLevel">The call level.</param> protected NamedIndex(IndexSegment root, int callLevel) : base(callLevel) { MemoryRoot = root; }
/// <summary> /// Initializes a new instance of the <see cref="ControlIndex"/> class. /// </summary> /// <param name="parentIndex">Index of the parent.</param> /// <param name="pathName">Name of the path.</param> public ControlIndex(ControlIndex parentIndex, IndexSegment pathName) : base(parentIndex, pathName) { }
/// <summary> /// Initializes a new instance of the <see cref="ControlIndex"/> class. /// </summary> /// <param name="root">The root.</param> /// <param name="callLevel">The call level.</param> public ControlIndex(IndexSegment root, int callLevel) : base(root, callLevel) { }