Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
 /// <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;
 }
Ejemplo n.º 5
0
 /// <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)
 {
 }
Ejemplo n.º 6
0
 /// <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)
 {
 }
Ejemplo n.º 7
0
 /// <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;
 }
Ejemplo n.º 8
0
 /// <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;
 }
Ejemplo n.º 9
0
 /// <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;
 }
Ejemplo n.º 10
0
 /// <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;
 }
Ejemplo n.º 11
0
 /// <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;
 }
Ejemplo n.º 12
0
 /// <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;
 }
Ejemplo n.º 13
0
 /// <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)
 {
 }
Ejemplo n.º 14
0
 /// <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)
 {
 }