Google API Client Library for .NET  1.10.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
Google.Apis.Requests.ClientServiceRequest< TResponse > Class Template Reference

Represents an abstract, strongly typed request base class to make requests to a service. Supports a strongly typed response. More...

Inheritance diagram for Google.Apis.Requests.ClientServiceRequest< TResponse >:
Google.Apis.Requests.IClientServiceRequest< TResponse > Google.Apis.Requests.IClientServiceRequest

Public Member Functions

TResponse Execute ()
 Executes the request and returns the result object. More...
 
Stream ExecuteAsStream ()
 Executes the request and returns the result stream. More...
 
async Task< TResponse > ExecuteAsync ()
 Executes the request asynchronously and returns the result object. More...
 
async Task< TResponse > ExecuteAsync (CancellationToken cancellationToken)
 Executes the request asynchronously and returns the result object. More...
 
async Task< Stream > ExecuteAsStreamAsync ()
 Executes the request asynchronously and returns the result stream. More...
 
async Task< Stream > ExecuteAsStreamAsync (CancellationToken cancellationToken)
 Executes the request asynchronously and returns the result stream. More...
 
HttpRequestMessage CreateRequest (Nullable< bool > overrideGZipEnabled=null)
 Creates a HTTP request message with all path and query parameters, ETag, etc. More...
 

Static Public Member Functions

static ETagAction GetDefaultETagAction (string httpMethod)
 Returns the default ETagAction for a specific HTTP verb. More...
 

Protected Member Functions

 ClientServiceRequest (IClientService service)
 Creates a new service request. More...
 
virtual void InitParameters ()
 Initializes request's parameters. Inherited classes MUST override this method to add parameters to the RequestParameters dictionary. More...
 
string GenerateRequestUri ()
 Generates the right URL for this request. More...
 
virtual object GetBody ()
 

Properties

ETagAction ETagAction [get, set]
 Defines whether the E-Tag will be used in a specified way or be ignored. More...
 
abstract string MethodName [get]
 
abstract string RestPath [get]
 
abstract string HttpMethod [get]
 
IDictionary< string, IParameterRequestParameters [get, set]
 
IClientService Service [get]
 
- Properties inherited from Google.Apis.Requests.IClientServiceRequest
string MethodName [get]
 Gets the name of the method to which this request belongs. More...
 
string RestPath [get]
 Gets the rest path of this request. More...
 
string HttpMethod [get]
 Gets the HTTP method of this request. More...
 
IDictionary< string, IParameterRequestParameters [get]
 Gets the parameters information for this specific request. More...
 
IClientService Service [get]
 Gets the service which is related to this request. More...
 

Detailed Description

Represents an abstract, strongly typed request base class to make requests to a service. Supports a strongly typed response.

Template Parameters
TResponseThe type of the response object

Constructor & Destructor Documentation

Google.Apis.Requests.ClientServiceRequest< TResponse >.ClientServiceRequest ( IClientService  service)
inlineprotected

Creates a new service request.

Member Function Documentation

HttpRequestMessage Google.Apis.Requests.ClientServiceRequest< TResponse >.CreateRequest ( Nullable< bool >  overrideGZipEnabled = null)
inline

Creates a HTTP request message with all path and query parameters, ETag, etc.

Parameters
overrideGZipEnabledIf null use the service default GZip behavior. Otherwise indicates if GZip is enabled or disabled.

Implements Google.Apis.Requests.IClientServiceRequest.

TResponse Google.Apis.Requests.ClientServiceRequest< TResponse >.Execute ( )
inline

Executes the request and returns the result object.

Implements Google.Apis.Requests.IClientServiceRequest< TResponse >.

Stream Google.Apis.Requests.ClientServiceRequest< TResponse >.ExecuteAsStream ( )
inline

Executes the request and returns the result stream.

Implements Google.Apis.Requests.IClientServiceRequest.

async Task<Stream> Google.Apis.Requests.ClientServiceRequest< TResponse >.ExecuteAsStreamAsync ( )
inline

Executes the request asynchronously and returns the result stream.

Implements Google.Apis.Requests.IClientServiceRequest.

async Task<Stream> Google.Apis.Requests.ClientServiceRequest< TResponse >.ExecuteAsStreamAsync ( CancellationToken  cancellationToken)
inline

Executes the request asynchronously and returns the result stream.

Parameters
cancellationTokenA cancellation token to cancel operation.

Implements Google.Apis.Requests.IClientServiceRequest.

async Task<TResponse> Google.Apis.Requests.ClientServiceRequest< TResponse >.ExecuteAsync ( )
inline

Executes the request asynchronously and returns the result object.

Implements Google.Apis.Requests.IClientServiceRequest< TResponse >.

async Task<TResponse> Google.Apis.Requests.ClientServiceRequest< TResponse >.ExecuteAsync ( CancellationToken  cancellationToken)
inline

Executes the request asynchronously and returns the result object.

Parameters
cancellationTokenA cancellation token to cancel operation.

Implements Google.Apis.Requests.IClientServiceRequest< TResponse >.

string Google.Apis.Requests.ClientServiceRequest< TResponse >.GenerateRequestUri ( )
inlineprotected

Generates the right URL for this request.

static ETagAction Google.Apis.Requests.ClientServiceRequest< TResponse >.GetDefaultETagAction ( string  httpMethod)
inlinestatic

Returns the default ETagAction for a specific HTTP verb.

virtual void Google.Apis.Requests.ClientServiceRequest< TResponse >.InitParameters ( )
inlineprotectedvirtual

Initializes request's parameters. Inherited classes MUST override this method to add parameters to the RequestParameters dictionary.

Property Documentation

ETagAction Google.Apis.Requests.ClientServiceRequest< TResponse >.ETagAction
getset

Defines whether the E-Tag will be used in a specified way or be ignored.


The documentation for this class was generated from the following file: