Ejemplo n.º 1
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);
                }
            }
        }