WebApiClient T  ClassThe WebApiClient Documentation
Represents a generic rest client able to make calls to a Web Api
Inheritance Hierarchy
System Object
  WebApiRestService WebApiClient T 

Namespace: WebApiRestService
Assembly: WebApiClient (in WebApiClient.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class WebApiClient<T> : IDisposable 
where T : class 
Type Parameters
T

The WebApiClient T  type exposes the following members.

Constructors
  NameDescription
Public methodWebApiClient T  
Initializes a new instance of WebApiClient T  using default options
Public methodWebApiClient T (WebApiClientOptions)
Initializes a new instance of WebApiClient T  using custom options
Public methodWebApiClient T (WebApiClientOptions, HttpClientHandler)
Initializes a new instance of WebApiClient T  using custom options
Top
Methods
  NameDescription
Public methodAddCookie(Cookie)
Adds a cookie to the request to be sent to the WebApi
Public methodAddCookie(CookieCollection)
Adds a collection of cookies to the request to be sent to the WebApi
Public methodAddCookie(String, String, String, String)
Adds a cookie to the request to be sent to the WebApi
Public methodCreateAsync(T)
Send an object to the Web Api to be created
Public methodCreateAsync(T, String)
Send an object to the Web Api to be created
Public methodCreateAsync(T, CancellationToken)
Send an object to the Web Api to be created
Public methodCreateAsync(T, String, CancellationToken)
Send an object to the Web Api to be created
Protected methodCreateAsync(T, String, String, CancellationToken)
Send an object to the Web Api to be created
Public methodDeleteAsync(Object)
Calls the Web Api to delete the object of type T
Public methodDeleteAsync(Object, String)
Calls the Web Api to delete the object of type T
Public methodDeleteAsync(Object, CancellationToken)
Calls the Web Api to delete the object of type T
Public methodDeleteAsync(Object, String, CancellationToken)
Calls the Web Api to delete the object of type T
Protected methodDeleteAsync(Object, String, String, CancellationToken)
Calls the Web Api to delete the object of type T
Public methodDispose
Disposes resources
Public methodEditAsync(T)
Send an object to the Web Api to be edited
Public methodEditAsync(T, String)
Send an object to the Web Api to be edited
Public methodEditAsync(T, CancellationToken)
Send an object to the Web Api to be edited
Public methodEditAsync(T, String, CancellationToken)
Send an object to the Web Api to be edited
Protected methodEditAsync(T, String, String, CancellationToken)
Send an object to the Web Api to be edited
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGenerateUri
Generates a Uri string based on the parameters provided
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetManyAsync 
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(Object)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(String)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(CancellationToken)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(Object, String)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(Object, CancellationToken)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(String, CancellationToken)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetManyAsync(Object, String, CancellationToken)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Protected methodGetManyAsync(Object, String, String, CancellationToken)
Returns a Task that will yield a list of objects of the specified type T from the Web Api
Public methodGetOneAsync 
Returns a Task that will yield an object of the specified type T from the Web Api
Public methodGetOneAsync(Object)
Returns a Task that will yield an object of the specified type T from the Web Api
Public methodGetOneAsync(CancellationToken)
Returns a Task that will yield an object of the specified type T from the Web Api
Public methodGetOneAsync(Object, String)
Returns a Task that will yield an object of the specified type T from the Web Api
Public methodGetOneAsync(Object, CancellationToken)
Returns a Task that will yield an object of the specified type T from the Web Api
Public methodGetOneAsync(Object, String, CancellationToken)
Returns a Task that will yield an object of the specified type T from the Web Api
Protected methodGetOneAsync(Object, String, String, CancellationToken)
Returns a Task that will yield an object of the specified type T from the Web Api
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodParseAnonymousObject
Converts an anonymous type into a dictionary
(Defined by ObjectExtensions.)
Top
Fields
  NameDescription
Protected fieldClient
The HttpClient used in this instance
Top
Properties
  NameDescription
Public propertyHandler
Gets the HttpClientHandler associated with this client
Public propertyHeaders
Gets the HttpClient headers
Public propertyOptions
Gets the WebApiClientOptions associated with this client
Top
See Also