private static async Task Main(string[] args) { Console.WriteLine("Hello World!"); var resultstr = Environment.GetFolderPath(Environment.SpecialFolder.Personal); var file = File.ReadAllText(resultstr + "\\pass\\doc2.txt").Trim(); var sp = file.Split(';'); var con = GetConnection(sp); var client = new OmvHttpService(null, con); client.SetHandlers(new NewtonsoftJsonSerializer(LocalJsonConverter.Singleton)); if (await client.LoginAsync(sp[0], sp[1])) { var objTest = new OmvSystemClient(client); var result = await objTest.GetSystemInformations(); var filesystem = new OmvFileSystemMgmtClient(client); var resultfile = await filesystem.GetFilesystems(); var omvExecClient = new OmvExecClient(client); var GetCandidatesBgstring = await filesystem.GetCandidatesBg(); var output = new Output <string>(); do { await Task.Delay(TimeSpan.FromSeconds(3)); output = await omvExecClient.GetOutput <string>(GetCandidatesBgstring, 0); } while (output.Running); } Console.ReadKey(); }
public async Task GetCandidatesBg() { var logger = new Mock <ILogger>(); var rpc = new OmvHttpService(logger.Object, new LocalIHttpClient()); var omvFileSystemMgmtClient = new OmvFileSystemMgmtClient(rpc); Assert.IsNotNull(omvFileSystemMgmtClient); var result = await omvFileSystemMgmtClient.GetCandidatesBg(); Assert.AreEqual("FileSystemMgmt_getCandidatesBg_result", result); }
public Task <string> GetListCandidatesFileSystemBackground() { return(_omvFileSystemMgmtClient.GetCandidatesBg()); }