public CloudReadonlyIndexedBlob(IIndexedBlobEntity entity, CloudIndexedBlobStore store, IndexedBlobReadOptions defaultReadOptions) { _entity = entity; _store = store; _defaultReadOptions = defaultReadOptions; _random = new Random(); Length = entity.Length; _properties = new Lazy <Dictionary <string, string> >(LoadProperties); }
protected CloudIndexedBlob(string fileKey, IndexedBlobEntity entity, IndexedBlobStorageOptions options, CloudIndexedBlobStore cloudIndexedBlobStore, Dictionary <string, string> properties) { _properties = properties != null ? new Dictionary <string, string>(properties) : new Dictionary <string, string>(); FileKey = fileKey; Exists = entity != null; _blobCount = entity != null ? entity.BlobCount : options.AdditionalBlobsForLoadBalancing + 1; Length = entity != null ? entity.Length : 0; _propertyCount = entity != null ? entity.PropertyCount : _properties.Count; Options = options; Store = cloudIndexedBlobStore; }
public CopyableIndexedBlob(CloudBlockBlob sourceBlob, string fileKey, IndexedBlobEntity entity, IndexedBlobStorageOptions options, CloudIndexedBlobStore cloudIndexedBlobStore, Dictionary <string, string> properties) : base(fileKey, entity, options, cloudIndexedBlobStore, properties) { _sourceBlob = sourceBlob; if (sourceBlob.Properties.Length == 0) { sourceBlob.FetchAttributes(); } Length = sourceBlob.Properties.Length; FileName = sourceBlob.Name; }
public DownloadUploadImportBlob(CloudBlockBlob sourceBlob, string fileKey, IndexedBlobEntity indexRecord, IndexedBlobStorageOptions options, CloudIndexedBlobStore store, Dictionary <string, string> properties) : base(fileKey, indexRecord, options, store, properties) { _sourceBlob = sourceBlob; if (sourceBlob.Properties.Length == 0) { sourceBlob.FetchAttributes(); } Length = sourceBlob.Properties.Length; FileName = sourceBlob.Name; }
internal IndexedBlobStoreClient(CloudIndexedBlobStore store) { _store = store; DefaultStorageOptions = new IndexedBlobStorageOptions(); DefaultReadOptions = new IndexedBlobReadOptions(); }
public UploadableIndexedBlob(string fileName, Stream stream, string fileKey, IndexedBlobEntity indexedBlobEntity, IndexedBlobStorageOptions options, CloudIndexedBlobStore cloudIndexedBlobStore, Dictionary <string, string> properties) : base(fileKey, indexedBlobEntity, options, cloudIndexedBlobStore, properties) { Length = stream.Length; _stream = stream; FileName = fileName; }