Exemplo n.º 1
0
        private static void List(FileApiClient client)
        {
            Console.WriteLine(string.Empty);
            Console.WriteLine("Listing files...");
            var list = client.GetFilesList().ToList();

            foreach (var file in list)
            {
                Console.WriteLine(file.fileUri + " " + file.hasInstructions + " " + file.lastUploaded);
            }

            foreach (var file in list.Take(10))
            {
                Status(client, file.fileUri, "ru-RU");
            }
        }
Exemplo n.º 2
0
        private void DeleteAllFiles(FileApiClient client)
        {
            Console.WriteLine("Done. Press 'd' to delete all files before exiting. Press any other key to just exit.");

            var key = Console.ReadKey();

            if (key.KeyChar == 'd')
            {
                var files = client.GetFilesList();
                foreach (var file in files)
                {
                    client.DeleteFile(file.fileUri);
                    Console.WriteLine("Deleted file: " + file.fileUri);
                }

                Console.WriteLine("All files were deleted. Press any key to exit.");
                Console.ReadKey();
            }
        }