Exemplo n.º 1
0
        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
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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
        }