コード例 #1
0
        public FileHandler(CloudStorageAccount storageAccount, ImageTestContext context)
        {
            // Retrieve storage account from connection string.
            _storageAccount = storageAccount;
            // Create the blob client.
            _blobClient = _storageAccount.CreateCloudBlobClient();
            // Retrieve reference to a previously created container.
            _container = _blobClient.GetContainerReference("pictures");
            _container.CreateIfNotExistsAsync();

            _db = context;

            imageSizes = new List<ImageSize>
            {
                new ImageSize { Size = Sizes.thumb, width = 80 },
                new ImageSize { Size = Sizes.small, width = 360 },
                new ImageSize { Size = Sizes.medium, width = 640 },
                new ImageSize { Size = Sizes.large, width = 1024 }
            };
            
        }
コード例 #2
0
ファイル: DbPicture.cs プロジェクト: s165519/ASPNET5Examples
 public DbPicture(ImageTestContext context)
 {
     db = context;
 }