internal async Task <HttpResponseMessage> SendMetadataRequestAsync(CancellationToken cancellationToken)
        {
            var request       = new ODataRequest(RestVerbs.Get, _session, ODataLiteral.Metadata);
            var requestRunner = new RequestRunner(_session);

            return(await requestRunner.ExecuteRequestAsync(request, cancellationToken));
        }
예제 #2
0
        public ODataClient(ODataBatch batch)
        {
            _urlBase = batch.RequestBuilder.UrlBase;
            _schema = Client.Schema.Get(_urlBase);

            _requestBuilder = batch.RequestBuilder;
            _requestRunner = batch.RequestRunner;
        }
예제 #3
0
        public ODataClient(string urlBase)
        {
            _urlBase = urlBase;
            _schema = Client.Schema.Get(urlBase);

            _requestBuilder = new CommandRequestBuilder(_urlBase);
            _requestRunner = new CommandRequestRunner();
        }
        public ODataClient(ODataBatch batch)
        {
            _settings = batch.Settings;
            _schema = Client.Schema.Get(_settings.UrlBase, _settings.Credentials);

            _requestBuilder = batch.RequestBuilder;
            _requestRunner = batch.RequestRunner;
        }
예제 #5
0
        public ODataClient(ODataBatch batch)
        {
            _urlBase = batch.RequestBuilder.UrlBase;
            _schema  = Client.Schema.Get(_urlBase);

            _requestBuilder = batch.RequestBuilder;
            _requestRunner  = batch.RequestRunner;
        }
예제 #6
0
        public ODataClient(string urlBase)
        {
            _urlBase = urlBase;
            _schema  = Client.Schema.Get(urlBase);

            _requestBuilder = new CommandRequestBuilder(_urlBase);
            _requestRunner  = new CommandRequestRunner();
        }
        public ODataClient(ODataClientSettings settings)
        {
            _settings = settings;
            _schema = Client.Schema.Get(_settings.UrlBase, _settings.Credentials);

            _requestBuilder = new CommandRequestBuilder(_settings.UrlBase, _settings.Credentials);
            _requestRunner = new CommandRequestRunner(_settings);
            _requestRunner.BeforeRequest = _settings.BeforeRequest;
            _requestRunner.AfterResponse = _settings.AfterResponse;
        }
예제 #8
0
 internal ODataClient(ODataClient client, ConcurrentDictionary <object, IDictionary <string, object> > batchEntries)
 {
     _settings      = client._settings;
     _session       = client.Session;
     _requestRunner = client._requestRunner;
     if (batchEntries != null)
     {
         _batchEntries    = batchEntries;
         _lazyBatchWriter = new Lazy <IBatchWriter>(() => _session.Adapter.GetBatchWriter(_batchEntries));
     }
 }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ODataClient"/> class.
 /// </summary>
 /// <param name="settings">The OData client settings.</param>
 public ODataClient(ODataClientSettings settings)
 {
     _settings      = settings;
     _session       = Session.FromSettings(_settings);
     _requestRunner = new RequestRunner(_session);
 }
 internal ODataClient(ODataClient client)
 {
     _settings      = client._settings;
     _session       = client.Session;
     _requestRunner = client._requestRunner;
 }
        internal async Task<HttpResponseMessage> SendMetadataRequestAsync(CancellationToken cancellationToken)
        {
            var request = new ODataRequest(RestVerbs.Get, _session, ODataLiteral.Metadata);
            var requestRunner = new RequestRunner(_session);

            return await requestRunner.ExecuteRequestAsync(request, cancellationToken);
        }
 public ClientWithRequest(ODataRequest request, ISession session)
 {
     _request       = request;
     _session       = session;
     _requestRunner = new RequestRunner(_session);
 }