public RootDirectoryInfoContract GetRoot() { var root = gateway.GetRoot(rootName, apiKey); root.Drive = GetDrive(); return(root); }
public RootDirectoryInfoContract GetRoot() { return(ExecuteInSemaphore(() => { GetDrive(); var root = _gateway.GetRoot(_rootName, _apiKey, _parameters); root.Drive = _drive; return root; }, nameof(GetRoot))); }
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); }
public RootDirectoryInfoContract GetRoot() { return(ExecuteInSemaphore(() => { var drive = GetDrive(); var root = gateway.GetRoot(rootName, apiKey); root.Drive = drive; return root; }, nameof(GetRoot))); }
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); }