コード例 #1
0
 protected override DriveInfoContract GetDrive()
 {
     if (_drive == null)
     {
         _drive      = _gateway.GetDrive(_rootName, _apiKey, _parameters);
         _drive.Name = DisplayRoot + Path.VolumeSeparatorChar;
     }
     return(_drive);
 }
コード例 #2
0
 protected override DriveInfoContract GetDrive()
 {
     if (drive == null)
     {
         drive      = gateway.GetDrive(rootName, apiKey);
         drive.Name = Name + Path.VolumeSeparatorChar;
     }
     return(drive);
 }
コード例 #3
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);
            }