public async Task<SettingsApplication> GetApplication(string applicatinName) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicatinName); return await applicationProvider.Get(); }
public async Task<WorkingDirectoryObject> OpenDirectoryAsync(string applicationName, int version, string directoryName, int objectId) { var applicationProvider = new ApplicationProvider(_url, _apiKey, applicationName); var application = await applicationProvider.Get(); if (application == null) { throw new SettingNotFoundException(directoryName); } var directory = application.Directories.SingleOrDefault(d => string.Equals(d.Name, directoryName)); if (directory == null) { throw new SettingNotFoundException(directoryName); } var workingDirectory = new WorkingDirectoryObject(directory, applicationName, version, objectId, _url, _apiKey); workingDirectory.UseCache = true; workingDirectory.ExplicitlySave = false; await workingDirectory.Reload(); return workingDirectory; }