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 ODataClient(ODataBatch batch) { _urlBase = batch.RequestBuilder.UrlBase; _schema = Client.Schema.Get(_urlBase); _requestBuilder = batch.RequestBuilder; _requestRunner = batch.RequestRunner; }
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; }
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; }
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)); } }
/// <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); }