示例#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
 public ScriptPathNode(ScriptProviderDrive drive, IScript script) : base(drive, script)
 {
     _script = script;
 }
 public ScriptProviderPathResolver(ScriptProviderDrive drive)
 {
     _drive = drive;
 }
示例#5
0
 public FolderPathNode(ScriptProviderDrive drive, IFolder folder)
 {
     _drive  = drive;
     _folder = folder;
 }