internal void RegisterRequestProviders() { RequestProviderFactory = new RequestProviderFactory(); RegisterSyncRequestProvider(new SyncRequestProvider(this)); RequestExecutorFactory.RegisterSyncRequestProvider(new SyncRequestExecutor()); #if Async RegisterAsyncRequestProvider(new AsyncRequestProvider(this)); RequestExecutorFactory.RegisterAsyncRequestProvider(new AsyncRequestExecutor()); #endif }
protected IShareFileClient GetShareFileClient(bool registerFakeExecutors = false) { var client = new ShareFileClient(BaseUriString); if (registerFakeExecutors) { RequestExecutorFactory.RegisterAsyncRequestProvider(A.Fake <IAsyncRequestExecutor>()); RequestExecutorFactory.RegisterSyncRequestProvider(A.Fake <ISyncRequestExecutor>()); } return(client); }
internal void RegisterRequestProviders() { RequestProviderFactory = new RequestProviderFactory(); RegisterSyncRequestProvider(() => new SyncRequestProvider(this)); if (RequestExecutorFactory.GetSyncRequestExecutor() == null) { RequestExecutorFactory.RegisterSyncRequestProvider(new SyncRequestExecutor()); } #if ASYNC RegisterAsyncRequestProvider(() => new AsyncRequestProvider(this)); if (RequestExecutorFactory.GetAsyncRequestExecutor() == null) { RequestExecutorFactory.RegisterAsyncRequestProvider(new AsyncRequestExecutor()); } #endif }