コード例 #1
0
        static void Main(string[] args)
        {
            // args "bucket-name" "container-name" "storageaccount-name" "storageaccount-key"

            Console.WriteLine("Listing AWS");
            var awsListTask = AmazonS3.ListObjectsAsync(args[0]);

            Console.WriteLine("Listing Azure");
            var azureListTask = AzureContainer.ListAsync(args[1], args[2], args[3]);

            Console.WriteLine("Awaiting both");
            Task.WhenAll(awsListTask, azureListTask);
            Console.WriteLine("Comparing");
            Compare(awsListTask.Result, azureListTask.Result);
            File.AppendAllLines(AppDomain.CurrentDomain.BaseDirectory + "\\aws.txt", awsListTask.Result);
            File.AppendAllLines(AppDomain.CurrentDomain.BaseDirectory + "\\az.txt", azureListTask.Result);
            Console.WriteLine("Done");
        }