Show / Hide Table of Contents

Class DynamicRestClient

A rest client that uses dynamic objects for invocation and result values. Strongly typed methods are for dynamic binding purposes only. Aside from construction, there is little or no need to interact with this type as anything other than a dynamic object.

Inheritance
Object
DynamicObject
RestProxy
DynamicRestClient
Implements
IDynamicMetaObjectProvider
IDisposable
Inherited Members
RestProxy._verbs
RestProxy.Parent
RestProxy.Name
RestProxy.TryInvoke(InvokeBinder, Object[], Object)
RestProxy.TryInvokeMember(InvokeMemberBinder, Object[], Object)
RestProxy.TryGetMember(GetMemberBinder, Object)
RestProxy.GetEndPointPath(StringBuilder)
RestProxy.GetEndPointPath()
RestProxy.ToString()
RestProxy.GetHashCode()
RestProxy.Equals(Object)
System.Dynamic.DynamicObject.GetDynamicMemberNames()
System.Dynamic.DynamicObject.GetMetaObject(System.Linq.Expressions.Expression)
System.Dynamic.DynamicObject.TryBinaryOperation(System.Dynamic.BinaryOperationBinder, System.Object, System.Object)
System.Dynamic.DynamicObject.TryConvert(System.Dynamic.ConvertBinder, System.Object)
System.Dynamic.DynamicObject.TryCreateInstance(System.Dynamic.CreateInstanceBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TryDeleteIndex(System.Dynamic.DeleteIndexBinder, System.Object[])
System.Dynamic.DynamicObject.TryDeleteMember(System.Dynamic.DeleteMemberBinder)
System.Dynamic.DynamicObject.TryGetIndex(System.Dynamic.GetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TrySetIndex(System.Dynamic.SetIndexBinder, System.Object[], System.Object)
System.Dynamic.DynamicObject.TrySetMember(System.Dynamic.SetMemberBinder, System.Object)
System.Dynamic.DynamicObject.TryUnaryOperation(System.Dynamic.UnaryOperationBinder, System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: DynamicRestProxy.PortableHttpClient
Assembly: DynamicRestProxy.NetStandard.dll
Syntax
public sealed class DynamicRestClient : RestProxy, IDynamicMetaObjectProvider, IDisposable

Constructors

| Improve this Doc View Source

DynamicRestClient(HttpClient, Boolean, Func<HttpRequestMessage, CancellationToken, Task>)

ctor

Declaration
public DynamicRestClient(HttpClient client, bool disposeClient = false, Func<HttpRequestMessage, CancellationToken, Task> configureRequest = null)
Parameters
Type Name Description
HttpClient client

HttpClient to use for communication

Boolean disposeClient

Flag indicating whether to take ownership of the client instance and dispose of when this instance is disposed

System.Func<HttpRequestMessage, CancellationToken, Task> configureRequest

A callback function that will be called just before any request is sent

| Improve this Doc View Source

DynamicRestClient(String, DynamicRestClientDefaults, Func<HttpRequestMessage, CancellationToken, Task>)

ctor

Declaration
public DynamicRestClient(string baseUri, DynamicRestClientDefaults defaults = null, Func<HttpRequestMessage, CancellationToken, Task> configureRequest = null)
Parameters
Type Name Description
String baseUri

The root url for all requests

DynamicRestClientDefaults defaults

Default values to add to all requests

System.Func<HttpRequestMessage, CancellationToken, Task> configureRequest

A callback function that will be called just before any request is sent

| Improve this Doc View Source

DynamicRestClient(String, HttpMessageHandler, Boolean, DynamicRestClientDefaults, Func<HttpRequestMessage, CancellationToken, Task>)

ctor

Declaration
public DynamicRestClient(string baseUri, HttpMessageHandler handler, bool disposeHandler = false, DynamicRestClientDefaults defaults = null, Func<HttpRequestMessage, CancellationToken, Task> configureRequest = null)
Parameters
Type Name Description
String baseUri

The root url for all requests

HttpMessageHandler handler

HttpMessageHandler to use for communication

Boolean disposeHandler

Flag indicating whether to take ownership of the handler instance and dispose of when this instance is disposed

DynamicRestClientDefaults defaults

Default values to add to all requests

System.Func<HttpRequestMessage, CancellationToken, Task> configureRequest

A callback function that will be called just before any request is sent

| Improve this Doc View Source

DynamicRestClient(Uri, DynamicRestClientDefaults, Func<HttpRequestMessage, CancellationToken, Task>)

ctor

Declaration
public DynamicRestClient(Uri baseUri, DynamicRestClientDefaults defaults = null, Func<HttpRequestMessage, CancellationToken, Task> configureRequest = null)
Parameters
Type Name Description
Uri baseUri

The root url for all requests

DynamicRestClientDefaults defaults

Default values to add to all requests

System.Func<HttpRequestMessage, CancellationToken, Task> configureRequest

A callback function that will be called just before any request is sent

| Improve this Doc View Source

DynamicRestClient(Uri, HttpMessageHandler, Boolean, DynamicRestClientDefaults, Func<HttpRequestMessage, CancellationToken, Task>)

ctor

Declaration
public DynamicRestClient(Uri baseUri, HttpMessageHandler handler, bool disposeHandler = false, DynamicRestClientDefaults defaults = null, Func<HttpRequestMessage, CancellationToken, Task> configureRequest = null)
Parameters
Type Name Description
Uri baseUri

The root url for all requests

HttpMessageHandler handler

HttpMessageHandler to use for communication

Boolean disposeHandler

Flag indicating whether to take ownership of the handler instance and dispose of when this instance is disposed

DynamicRestClientDefaults defaults

Default values to add to all requests

System.Func<HttpRequestMessage, CancellationToken, Task> configureRequest

A callback function that will be called just before any request is sent

Properties

| Improve this Doc View Source

BaseUri

BaseUri
Declaration
protected override Uri BaseUri { get; }
Property Value
Type Description
Uri
Overrides
RestProxy.BaseUri

Methods

| Improve this Doc View Source

CreateProxyNode(RestProxy, String)

CreateProxyNode(RestProxy, String)
Declaration
protected override RestProxy CreateProxyNode(RestProxy parent, string name)
Parameters
Type Name Description
RestProxy parent
String name
Returns
Type Description
RestProxy
Overrides
RestProxy.CreateProxyNode(RestProxy, String)
| Improve this Doc View Source

CreateVerbAsyncTask<T>(String, IEnumerable<Object>, IEnumerable<KeyValuePair<String, Object>>, CancellationToken, JsonSerializerSettings)

CreateVerbAsyncTask<T>(String, IEnumerable<Object>, IEnumerable<KeyValuePair<String, Object>>, CancellationToken, JsonSerializerSettings)
Declaration
protected override Task<T> CreateVerbAsyncTask<T>(string verb, IEnumerable<object> unnamedArgs, IEnumerable<KeyValuePair<string, object>> namedArgs, CancellationToken cancelToken, JsonSerializerSettings serializationSettings)
Parameters
Type Name Description
String verb
System.Collections.Generic.IEnumerable<Object> unnamedArgs
System.Collections.Generic.IEnumerable<KeyValuePair<String, Object>> namedArgs
CancellationToken cancelToken
Newtonsoft.Json.JsonSerializerSettings serializationSettings
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T
Overrides
RestProxy.CreateVerbAsyncTask<T>(String, IEnumerable<Object>, IEnumerable<KeyValuePair<String, Object>>, CancellationToken, JsonSerializerSettings)
| Improve this Doc View Source

Dispose()

Disposes the contained HttpClient

Declaration
public void Dispose()

Implements

IDynamicMetaObjectProvider
IDisposable
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX