public LongOperationAwaiter(Guid taskId,
                             Func <Guid, Task <ApiTaskResult <TResult, TFailure> > > checkStatusAsync,
                             IPollingStrategy pollingStrategy)
     : base(taskId)
 {
     this.checkStatusAsync = checkStatusAsync;
     this.pollingStrategy  = pollingStrategy;
 }
Пример #2
0
        public BlobPoller(IPollingStrategy pollingStrategy)
        {
            if (pollingStrategy is null)
            {
                throw new ArgumentNullException(nameof(pollingStrategy));
            }

            this.pollingStrategy = pollingStrategy;
        }
Пример #3
0
 public ExternClientServices(
     ContentManagementOptions contentManagementOptions,
     IHttpRequestFactory http,
     IJsonSerializer jsonSerializer,
     IExternHttpClient api,
     IPollingStrategy longOperationsPollingStrategy,
     IAuthenticator authenticator,
     ICrypt crypt)
 {
     Http           = http ?? throw new ArgumentNullException(nameof(http));
     JsonSerializer = jsonSerializer ?? throw new ArgumentNullException(nameof(jsonSerializer));
     Api            = api ?? throw new ArgumentNullException(nameof(api));
     LongOperationsPollingStrategy = longOperationsPollingStrategy ?? throw new ArgumentNullException(nameof(longOperationsPollingStrategy));
     Authenticator  = authenticator ?? throw new ArgumentNullException(nameof(authenticator));
     Crypt          = crypt ?? throw new ArgumentNullException(nameof(crypt));
     ContentService = new ContentService(api.Contents, contentManagementOptions);
 }
Пример #4
0
 public LongOperationAwaiter(Guid taskId, Func <Guid, Task <LongOperationStatus> > checkStatusAsync, IPollingStrategy pollingStrategy)
 {
     this.checkStatusAsync = checkStatusAsync;
     this.pollingStrategy  = pollingStrategy;
     TaskId = taskId;
 }
 public LongOperation(Func <Task <ApiTaskResult <T> > > startAsync, Func <Guid, Task <ApiTaskResult <T> > > checkStatusAsync, IPollingStrategy pollingStrategy)
 {
     this.startAsync       = startAsync;
     this.checkStatusAsync = checkStatusAsync;
     this.pollingStrategy  = pollingStrategy;
 }
Пример #6
0
 public Configured WithLongOperationsPollingStrategy(IPollingStrategy strategy)
 {
     pollingStrategy = strategy ?? throw new ArgumentNullException(nameof(strategy));
     return(this);
 }
 public DeviceDataFetcher(IDeviceDataReader deviceDataReader, IPollingStrategy pollingStrategy)
 {
     this.deviceDataReader = deviceDataReader;
     this.pollingStrategy = pollingStrategy;
 }