コード例 #1
0
        public RootDirectoryInfoContract GetRoot()
        {
            var root = gateway.GetRoot(rootName, apiKey);

            root.Drive = GetDrive();
            return(root);
        }
コード例 #2
0
 public RootDirectoryInfoContract GetRoot()
 {
     return(ExecuteInSemaphore(() => {
         GetDrive();
         var root = _gateway.GetRoot(_rootName, _apiKey, _parameters);
         root.Drive = _drive;
         return root;
     }, nameof(GetRoot)));
 }
コード例 #3
0
            public TestDirectory(ICloudGateway gateway, RootName root, string apiKey, string path)
            {
                this.gateway = gateway;
                this.root    = root;

                var rootDirectory = gateway.GetRoot(root, apiKey);

                directory = gateway.NewDirectoryItem(root, rootDirectory.Id, path);
            }
コード例 #4
0
ファイル: CloudDrive.cs プロジェクト: zhang024/DokanCloudFS
 public RootDirectoryInfoContract GetRoot()
 {
     return(ExecuteInSemaphore(() => {
         var drive = GetDrive();
         var root = gateway.GetRoot(rootName, apiKey);
         root.Drive = drive;
         return root;
     }, nameof(GetRoot)));
 }
コード例 #5
0
            private TestDirectoryFixture(ICloudGateway gateway, RootName root, string apiKey, IDictionary <string, string> parameters, string path)
            {
                this.gateway = gateway;
                this.root    = root;

                gateway.GetDrive(root, apiKey, parameters);
                var rootDirectory = gateway.GetRoot(root, apiKey, parameters);

                var residualDirectory = gateway.GetChildItem(root, rootDirectory.Id).SingleOrDefault(f => f.Name == path) as DirectoryInfoContract;

                if (residualDirectory != null)
                {
                    gateway.RemoveItem(root, residualDirectory.Id, true);
                }

                directory = gateway.NewDirectoryItem(root, rootDirectory.Id, path);
            }