コード例 #1
0
        public static IPathNode Create(ScriptProviderDrive drive, IItem item)
        {
            switch (item.NodeType)
            {
            case (NodeType.Folder):
            {
                return(new FolderPathNode(drive, item as IFolder));
            }

            case (NodeType.Script):
            {
                return(new ScriptPathNode(drive, item as IScript));
            }

            case (NodeType.Root):
            {
                return(new RootPathNode(drive));
            }

            default:
            {
                throw new NotSupportedException("the specified node type is not yet supported");
            }
            }
        }
コード例 #2
0
 public RootPathNode(ScriptProviderDrive drive) : base(drive, drive.RootFolder as IFolder)
 {
 }
コード例 #3
0
ファイル: ScriptPathNode.cs プロジェクト: smallfoxx/simplex
 public ScriptPathNode(ScriptProviderDrive drive, IScript script) : base(drive, script)
 {
     _script = script;
 }
コード例 #4
0
 public ScriptProviderPathResolver(ScriptProviderDrive drive)
 {
     _drive = drive;
 }
コード例 #5
0
ファイル: FolderPathNode.cs プロジェクト: smallfoxx/simplex
 public FolderPathNode(ScriptProviderDrive drive, IFolder folder)
 {
     _drive  = drive;
     _folder = folder;
 }