示例#1
0
        static void Test()
        {
            ConsoleUtility.LogInstructions("Starts testing if service is ready");
            var result = FileServiceProxy.IsConnectionReadyAsync();

            result.Wait();
            ConsoleUtility.LogTaskResult(result);
        }
示例#2
0
        static void GetFile()
        {
            ConsoleUtility.LogInstructions("Starts getting file");
            var fileFullName = FileServiceProxy.FileToDownload;

            Console.Write($"Starts getting file:\n at: {fileFullName} \n\n");
            var result = FileServiceProxy.GetFileAsync(fileFullName);

            result.Wait();
            ConsoleUtility.LogTaskResult(result);
        }
示例#3
0
        static void DeleteFile()
        {
            ConsoleUtility.LogInstructions("Starts deleting file");
            var fileFullName = FileServiceProxy.UploadFolderPath + @"\" + Path.GetFileName(FileServiceProxy.FileToUpload);

            Console.Write($"Starts deleting file:\n at: {fileFullName} \n\n");
            var result = FileServiceProxy.DeleteFileAsync(fileFullName);

            result.Wait();
            ConsoleUtility.LogTaskResult(result);
        }
示例#4
0
        static void SaveFile()
        {
            ConsoleUtility.LogInstructions("Starts saving file");
            var fileFullName     = FileServiceProxy.FileToUpload;
            var fileUploadFolder = FileServiceProxy.UploadFolderPath;

            Console.Write($"Starts upload file:\n From: {fileFullName} \n   To: {fileUploadFolder}\n\n");
            var result = FileServiceProxy.SaveFileAsync(fileFullName, fileUploadFolder);

            result.Wait();
            ConsoleUtility.LogTaskResult(result);
        }