コード例 #1
0
        private static IStorageBlobClient CreateClient()
        {
            Mock<IServiceProvider> services = new Mock<IServiceProvider>(MockBehavior.Strict);
            StorageClientFactory clientFactory = new StorageClientFactory();
            services.Setup(p => p.GetService(typeof(StorageClientFactory))).Returns(clientFactory);

            IStorageAccount account = new StorageAccount(CloudStorageAccount.DevelopmentStorageAccount, services.Object);
            return account.CreateBlobClient();
        }
コード例 #2
0
 private static IStorageBlobClient CreateClient()
 {
     IStorageAccount account = new StorageAccount(CloudStorageAccount.DevelopmentStorageAccount);
     return account.CreateBlobClient();
 }