Ejemplo n.º 1
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Profile);
     ChildrenList.Add(Function);
     return(ChildrenList);
 }
Ejemplo n.º 2
0
        public override BidirectionalTreeNode <T> AddChild(T value)
        {
            var node = new BidirectionalTreeNode <T>(value, this);

            ChildrenList.Add(node);
            return(node);
        }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(StateType);
     ChildrenList.Add(Initializer);
     return(ChildrenList);
 }
Ejemplo n.º 4
0
        public override TreeNode <T> AddChild(T value)
        {
            var node = new TreeNode <T>(value);

            ChildrenList.Add(node);
            return(node);
        }
Ejemplo n.º 5
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.AddRange(Cases);
     ChildrenList.Add(Statements);
     return(ChildrenList);
 }
Ejemplo n.º 6
0
 /// <inheritdoc/>
 public override System.Collections.Generic.IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Name);
     ChildrenList.Add(Value);
     return(ChildrenList);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Deserialize object.
 /// </summary>
 /// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> to retrieve data.</param>
 /// <param name="ctxt">The source (see <see cref="System.Runtime.Serialization.StreamingContext"/>) for this deserialization.</param>
 private ActorType(SerializationInfo info, StreamingContext ctxt)
 {
     _actorTypes = (ActorTypesManager)info.GetValue("ActorTypes", typeof(ActorTypesManager));
     _name       = info.GetString("Name");
     _parent     = (ActorType)info.GetValue("Parent", typeof(ActorType));
     _children   = (ChildrenList)info.GetValue("Children", typeof(ChildrenList));
 }
Ejemplo n.º 8
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Condition);
     ChildrenList.Add(Statement);
     return(ChildrenList);
 }
Ejemplo n.º 9
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Target);
     ChildrenList.Add(Member);
     return(ChildrenList);
 }
Ejemplo n.º 10
0
        private ChildrenList AllocateChildrenList()
        {
            ChildrenList list = null;

            foreach (ChildrenList auxList in this.childrenListPool)
            {
                if (!auxList.beingUsed)
                {
                    list = auxList;
                    list.Clear();

                    break;
                }
            }

            if (list == null)
            {
                list = new ChildrenList();
                this.childrenListPool.Add(list);
            }

            list.beingUsed = true;

            return(list);
        }
Ejemplo n.º 11
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Name);
     ChildrenList.AddRange(Body);
     return(ChildrenList);
 }
Ejemplo n.º 12
0
        public void CopyPropertiesToGenericNodeProperties()
        {
            if (ParentNodeA != null)
            {
                var genericParentA = new GenericNodeWithDistance(ParentNodeA, DistanceParentNodeA);
                if (!ParentList.Contains(genericParentA))
                {
                    ParentList.Add(genericParentA);
                }
            }

            if (ParentNodeB != null)
            {
                var genericParentB = new GenericNodeWithDistance(ParentNodeB, DistanceParentNodeB);
                if (!ParentList.Contains(genericParentB))
                {
                    ParentList.Add(genericParentB);
                }
            }

            if (ChildNode != null)
            {
                var genericChild = new GenericNodeWithDistance(ChildNode, DistanceChildNode);
                if (!ChildrenList.Contains(genericChild))
                {
                    ChildrenList.Add(genericChild);
                }
            }
        }
Ejemplo n.º 13
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Condition);
     ChildrenList.AddRange(Groups);
     return(ChildrenList);
 }
Ejemplo n.º 14
0
 /// <inheritdoc/>
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.AddRange(Arguments);
     ChildrenList.Add(Target);
     return(ChildrenList);
 }
Ejemplo n.º 15
0
            public TreeNode <T> AddChild(T data)
            {
                TreeNode <T> child = new TreeNode <T>(data);

                ChildrenList.Add(child);
                return(child);
            }
Ejemplo n.º 16
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Left);
     ChildrenList.Add(Right);
     return(ChildrenList);
 }
Ejemplo n.º 17
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Name);
     ChildrenList.AddRange(BaseClasses);
     ChildrenList.AddRange(Members);
     return(ChildrenList);
 }
Ejemplo n.º 18
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Collection);
     ChildrenList.Add(Variable);
     ChildrenList.Add(Body);
     return(ChildrenList);
 }
Ejemplo n.º 19
0
 internal void ImmediatelyRemoveChild(Object2D child)
 {
     if (IsAlive)
     {
         CoreObject.RemoveChild(child.CoreObject);
         ChildrenList.Remove(child);
     }
 }
Ejemplo n.º 20
0
 public override IElement this[int index]
 {
     get
     {
         ChildrenList.Sort(Comparer);
         return(ChildrenList[index]);
     }
 }
Ejemplo n.º 21
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.AddRange(Attributes);
     ChildrenList.Add(Name);
     ChildrenList.AddRange(Passes);
     return(ChildrenList);
 }
Ejemplo n.º 22
0
 public override void RemoveChild(IElement element)
 {
     if (element.IsLocked)
     {
         throw new ElementIsLockedException(element.Name);
     }
     ChildrenList.Remove(element);
 }
        /// <summary>
        /// Order this node's children with an item comparer
        /// </summary>
        /// <param name="itemComparer"></param>
        public virtual void OrderChildren(IComparer <TItem> itemComparer)
        {
            var comparer = new NodeOrderItemComparer <TNode, TItem>(itemComparer);

            ChildrenList.Sort(comparer);
            SetChildrenSiblingReferences();

            OnChildrenReordered();
        }
        public MultiTreeNode <TValue, TConnectionWay> AddChild(TValue value, TConnectionWay connectionWay)
        {
            var node = root.FindOrCreateNode(value);

            node.SetParent(this);
            ChildrenList.Add(node);
            ConnectionWays.Add(connectionWay);
            return(node);
        }
Ejemplo n.º 25
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.AddRange(BaseClasses);
     ChildrenList.AddRange(GenericParameters);
     ChildrenList.AddRange(ShaderGenerics);
     ChildrenList.AddRange(Members);
     return(ChildrenList);
 }
Ejemplo n.º 26
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     if (SubLiterals != null)
     {
         ChildrenList.AddRange(SubLiterals);
     }
     return(ChildrenList);
 }
Ejemplo n.º 27
0
        /// <inheritdoc />
        public override IEnumerable <Node> Childrens()
        {
            ChildrenList.Clear();
            if (Case != null)
            {
                ChildrenList.Add(Case);
            }

            return(ChildrenList);
        }
Ejemplo n.º 28
0
 /// <inheritdoc />
 public override IEnumerable <Node> Childrens()
 {
     ChildrenList.Clear();
     ChildrenList.Add(Type);
     if (IsGroup)
     {
         ChildrenList.AddRange(SubDeclarators);
     }
     return(ChildrenList);
 }
Ejemplo n.º 29
0
        public virtual void RemoveChild(TValue value)
        {
            var node = ChildrenList.FirstOrDefault(x => value.Equals(x.Value));

            if (node == null)
            {
                throw new InvalidOperationException(string.Format("Could not find child '{0}'.", value));
            }
            ChildrenList.Remove(node);
        }
Ejemplo n.º 30
0
 public void AddChild(int childID)
 {
     // FIX
     System.Diagnostics.Debug.WriteLine("YES, YES, YES, Adding  " + childID);
     ChildrenList.Add(childID);
     System.Diagnostics.Debug.WriteLine("YES, YES, YES, Adding 1, 2, 3");
     ChildrenList.Add(1);
     ChildrenList.Add(2);
     ChildrenList.Add(3);
     //Name += "EDITADO";
 }