示例#1
0
 public AzureBlobStorage(IAzureBlobStorageConfiguration configuration, IFileRestriction fileRestriction)
 {
     _fileRestriction = fileRestriction;
     var storageAccount = CloudStorageAccount.Parse(configuration.StorageConnectionString);
     var client = storageAccount.CreateCloudBlobClient();
     _container = client.GetContainerReference(configuration.Container);
 }
        public AzureBlobRepository(IAzureBlobStorageConfiguration config)
        {
            _config       = config;
            _blobClient   = new Lazy <CloudBlobClient>(InitialiseBlobCLient);
            _logContainer = new Lazy <CloudBlobContainer>(InitialiseBlobContainer);

            _serialiserSettings = new JsonSerializerSettings
            {
                Formatting = Formatting.Indented
            };
            _serialiserSettings.Converters.Add(new StringEnumConverter());
        }