/// <summary>IoC constructor.</summary> /// <param name="observer">Can be <see langword="null"/>.</param> public TableStorageProvider(CloudTableClient tableStorage, IDataSerializer serializer = null, IStorageObserver observer = null) { _policies = new RetryPolicies(observer); _tableStorage = tableStorage; _serializer = serializer ?? new CloudFormatter(); _observer = observer; }
public static TTask Catch <TTask>(this TTask task, IStorageObserver observer) where TTask : Task { if (task != null && task.Status != TaskStatus.RanToCompletion) { task.ContinueWith( innerTask => observer.Notify(new TaskFailedEvent(innerTask.Exception)), TaskContinuationOptions.OnlyOnFaulted); } return(task); }
/// <summary> /// Optionally provide a storage event observer, e.g. a <see cref="StorageObserverSubject"/>. /// </summary> public CloudStorageBuilder WithObserver(IStorageObserver observer) { Observer = observer; return this; }
/// <summary> /// Optionally provide a storage event observer, e.g. a <see cref="StorageObserverSubject"/>. /// </summary> public CloudStorageBuilder WithObserver(IStorageObserver observer) { Observer = observer; return(this); }
/// <summary> /// Optionally provide a set of observers, will use a <see cref="StorageObserverSubject"/> internally. /// </summary> public CloudStorageBuilder WithObservers(params IObserver <IStorageEvent>[] observers) { Observer = new StorageObserverSubject(observers); return(this); }
public TransientTableErrorBackOffRetry(IStorageObserver storageObserver) { this.storageObserver = storageObserver; }
public SlowInstantiationRetry(IStorageObserver storageObserver) { this.storageObserver = storageObserver; }
public NetworkCorruptionRetry(IStorageObserver storageObserver) { this.storageObserver = storageObserver; }
public ForAzureStorageClientRetry(IStorageObserver storageObserver) { this.storageObserver = storageObserver; }
public OptimisticConcurrencyAzureRetry(IStorageObserver storageObserver) { this.storageObserver = storageObserver; }
/// <param name="observer">Can be <see langword="null"/>.</param> internal RetryPolicies(IStorageObserver observer) { _observer = observer; }
/// <summary> /// Optionally provide a set of observers, will use a <see cref="StorageObserverSubject"/> internally. /// </summary> public CloudStorageBuilder WithObservers(params IObserver<IStorageEvent>[] observers) { Observer = new StorageObserverSubject(observers); return this; }