示例#1
0
 public IDominoWrapper(DominoAssembly parent)
 {
     Innode = new DominoConnector
     {
         next = this
     };
     this.parent = parent;
 }
示例#2
0
        public static IDominoWrapper CreateNodeFromPath(DominoAssembly futureParent, string path)
        {
            var parentPath   = Workspace.Find(futureParent);
            var relPath      = Workspace.MakeRelativePath(parentPath, path);
            var deserialized = Workspace.Load <IDominoProvider>(path);

            return(deserialized switch
            {
                FieldParameters _ => new FieldNode(relPath, futureParent),
                StructureParameters _ => new StructureNode(relPath, futureParent),
                SpiralParameters _ => new SpiralNode(relPath, futureParent),
                CircleParameters _ => new CircleNode(relPath, futureParent),
                _ => throw new ArgumentException("Path is not loadable"),
            });
示例#3
0
        // Check for circular references
        public bool ContainsReferenceTo(DominoAssembly assembly)
        {
            bool result = false;

            foreach (var s in children.OfType <AssemblyNode>())
            {
                if (s.obj == assembly)
                {
                    return(true);
                }
                else
                {
                    result = result && ContainsReferenceTo(assembly);
                }
            }
            return(result);
        }
示例#4
0
        public static IDominoWrapper CreateNodeFromPath(DominoAssembly futureParent, string path)
        {
            var parentPath   = Workspace.Find(futureParent);
            var relPath      = Workspace.MakeRelativePath(parentPath, path);
            var deserialized = Workspace.Load <IDominoProvider>(path);

            switch (deserialized)
            {
            case FieldParameters p:
                return(new FieldNode(relPath, futureParent));

            case StructureParameters p:
                return(new StructureNode(relPath, futureParent));

            case SpiralParameters p:
                return(new SpiralNode(relPath, futureParent));

            case CircleParameters p:
                return(new CircleNode(relPath, futureParent));

            default:
                throw new ArgumentException("Path is not loadable");
            }
        }
示例#5
0
 public IDominoWrapper(DominoAssembly parent)
 {
     innode      = new DominoConnector();
     innode.next = this;
     this.parent = parent;
 }