Exemplo n.º 1
0
        public RequestSource(WebServiceClient client, string node = "api")
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            mClient = client;
            mNode   = node;
        }
Exemplo n.º 2
0
        internal RequestBuilder([NotNull] WebServiceClient client, [NotNull] string requestPath)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            if (requestPath.NormalizeNull() == null)
            {
                throw new ArgumentNullException(nameof(requestPath));
            }

            mHeaders         = new MemoryKeyValueStore <string>();
            mParameters      = new MemoryKeyValueStore();
            mAuthentications = new List <ServiceClientAuthentication>();
            mCallbacks       = new List <Tuple <Func <IWebResult, bool>, Action <WebServiceClientResponse> > >();
            mInterceptors    = new List <Func <RequestInterceptorContext, Task> >();
            mClient          = client;
            mRequestPath     = requestPath;
            mVerb            = RequestVerb.Get;
        }