Class BaseClientService.Initializer
An initializer class for the client service.
Inheritance
Inherited Members
Namespace: Google.Apis.Services
Assembly: Google.Apis.dll
Syntax
public class Initializer
Constructors
Initializer()
Constructs a new initializer with default values.
Declaration
public Initializer()
Properties
ApiKey
Gets or sets the API Key. Default value is null
.
Declaration
public string ApiKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ApplicationName
Gets or sets Application name to be used in the User-Agent header. Default value is null
.
Declaration
public string ApplicationName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
BaseUri
Gets or sets the base URI to use for the service. If the value is null
,
the default base URI for the service is used.
Declaration
public string BaseUri { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DefaultExponentialBackOffPolicy
Get or sets the exponential back-off policy used by the service. Default value is
UnsuccessfulResponse503
, which means that exponential back-off is used on 503 abnormal HTTP
response.
If the value is set to None
, no exponential back-off policy is used, and it's up to the user to
configure the ConfigurableMessageHandler in an
Google.Apis.Http.IConfigurableHttpClientInitializer to set a specific back-off
implementation (using Google.Apis.Http.BackOffHandler).
Declaration
public ExponentialBackOffPolicy DefaultExponentialBackOffPolicy { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.Http.ExponentialBackOffPolicy |
GZipEnabled
Gets or sets whether this service supports GZip. Default value is true
.
Declaration
public bool GZipEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HttpClientFactory
Gets or sets the factory for creating System.Net.Http.HttpClient instance. If this property is not set the service uses a new HttpClientFactory instance.
Declaration
public IHttpClientFactory HttpClientFactory { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.Http.IHttpClientFactory |
HttpClientInitializer
Gets or sets a HTTP client initializer which is able to customize properties on Google.Apis.Http.ConfigurableHttpClient and ConfigurableMessageHandler.
Declaration
public IConfigurableHttpClientInitializer HttpClientInitializer { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.Http.IConfigurableHttpClientInitializer |
MaxUrlLength
Maximum allowed length of a URL string for GET requests. Default value is 2048
. If the value is
set to 0
, requests will never be modified due to URL string length.
Declaration
public uint MaxUrlLength { get; set; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Serializer
Gets or sets the serializer. Default value is NewtonsoftJsonSerializer.
Declaration
public ISerializer Serializer { get; set; }
Property Value
Type | Description |
---|---|
Google.Apis.ISerializer |