Ads API .NET library
|
This class reads the configuration keys from App.config. More...
Public Member Functions | |
virtual string | GetDefaultOAuth2Scope () |
Gets the default OAuth2 scope. More... | |
virtual string | GetUserAgent () |
Gets the user agent text. More... | |
AppConfigBase () | |
The default constructor. More... | |
AppConfigBase (IConfigurationRoot configurationRoot) | |
Initializes a new instance of the AppConfigBase class. More... | |
AppConfigBase (IConfigurationSection configurationSection) | |
Initializes a new instance of the AppConfigBase class. More... | |
virtual object | Clone () |
Creates a new object that is a copy of the current instance. More... | |
Protected Member Functions | |
void | LoadFromConfiguration (IConfiguration configuration, string sectionName) |
Initializes a new instance of the AppConfigBase class. More... | |
void | LoadFromAppConfigSection (string sectionName) |
Attempts to load the configuration section with the given name. More... | |
virtual void | ReadSettings (Dictionary< string, string > settings) |
Read all settings from App.config. More... | |
void | ReadSetting (Dictionary< string, string > settings, ConfigSetting settingField) |
Reads a setting from a given dictionary. More... | |
void | SetPropertyAndNotify< T > (ConfigSetting< T > field, T newValue, [CallerMemberName] String propertyName="") |
Sets the specified property and notify any listeners. More... | |
Properties | |
bool | MaskCredentials [get, set] |
Gets or sets whether the credentials in the log file should be masked. More... | |
IWebProxy | Proxy [get, set] |
Gets or sets the web proxy to be used with the services. More... | |
int | Timeout [get, set] |
Gets or sets the timeout for Ads services in milliseconds. More... | |
int | RetryCount [get, set] |
Gets or sets the number of times to retry a call if an API call fails and can be retried. More... | |
bool | EnableGzipCompression [get, set] |
Gets or sets whether gzip compression should be turned on for SOAP requests and responses. More... | |
string | OAuth2ServerUrl [get, set] |
Gets or sets the OAuth2 server URL. More... | |
string | OAuth2ClientId [get, set] |
Gets or sets the OAuth2 client ID. More... | |
string | OAuth2ClientSecret [get, set] |
Gets or sets the OAuth2 client secret. More... | |
string | OAuth2AccessToken [get, set] |
Gets or sets the OAuth2 access token. More... | |
string | OAuth2RefreshToken [get, set] |
Gets or sets the OAuth2 refresh token. More... | |
string | OAuth2Scope [get, set] |
Gets or sets the OAuth2 scope. More... | |
string | OAuth2RedirectUri [get, set] |
Gets or sets the OAuth2 redirect URI. More... | |
OAuth2Flow | OAuth2Mode [get, set] |
Gets or sets the OAuth2 mode. More... | |
string | OAuth2PrnEmail [get, set] |
Gets or sets the OAuth2 prn email. More... | |
string | OAuth2ServiceAccountEmail [get, set] |
Gets the OAuth2 service account email. More... | |
string | OAuth2PrivateKey [get, set] |
Gets the OAuth2 private key for service account flow. More... | |
string | OAuth2SecretsJsonPath [get, set] |
Gets or sets the OAuth2 secrets JSON file path. More... | |
bool | IncludeUtilitiesInUserAgent [get, set] |
Gets or sets whether usage of various client library features should be tracked. More... | |
string | Signature [get] |
Gets the signature for this library. More... | |
virtual long | UnixTimestamp [get] |
Gets the number of seconds after Jan 1, 1970, 00:00:00 More... | |
Properties inherited from Google.Api.Ads.Common.Lib.AppConfig | |
bool | MaskCredentials [get] |
Gets whether the credentials in the log file should be masked. More... | |
string | OAuth2ServerUrl [get, set] |
Gets or sets the OAuth2 server URL. More... | |
OAuth2Flow | OAuth2Mode [get, set] |
Gets or sets the OAuth2 mode. More... | |
string | OAuth2AccessToken [get, set] |
Gets or sets the OAuth2 access token. More... | |
string | OAuth2ClientId [get, set] |
Gets or sets the OAuth2 client id. More... | |
string | OAuth2ClientSecret [get, set] |
Gets or sets the OAuth2 client secret. More... | |
string | OAuth2RedirectUri [get, set] |
Gets or sets the OAuth2 redirect URI. More... | |
string | OAuth2RefreshToken [get, set] |
OAuth2 refresh token. More... | |
string | OAuth2Scope [get, set] |
Gets or sets the OAuth2 scope. More... | |
string | OAuth2PrnEmail [get, set] |
Gets or sets the OAuth2 prn email. More... | |
string | OAuth2SecretsJsonPath [get, set] |
Gets or sets the OAuth2 secrets JSON file. More... | |
string | OAuth2PrivateKey [get] |
Gets the OAuth2 private key for service account flow. More... | |
string | OAuth2ServiceAccountEmail [get] |
Gets the OAuth2 service account email. More... | |
bool | IncludeUtilitiesInUserAgent [get, set] |
Gets or sets whether usage information of various client library features should be included in the user agent. More... | |
IWebProxy | Proxy [get, set] |
Gets the web proxy to be used with the services. More... | |
int | RetryCount [get, set] |
Gets or sets the number of times to retry a call if an API call fails and can be retried. More... | |
string | Signature [get] |
Gets the signature for this library. More... | |
int | Timeout [get, set] |
Gets or sets the timeout for Ads services in milliseconds. More... | |
bool | EnableGzipCompression [get, set] |
Gets or sets whether gzip compression should be turned on for SOAP requests and responses. More... | |
long | UnixTimestamp [get] |
Gets the number of seconds after Jan 1, 1970, 00:00:00 More... | |
Events | |
PropertyChangedEventHandler | PropertyChanged |
Occurs when a property value changes. More... | |
Events inherited from Google.Api.Ads.Common.Lib.AppConfig | |
PropertyChangedEventHandler | PropertyChanged |
Occurs when a property is changed. More... | |
This class reads the configuration keys from App.config.
|
inline |
The default constructor.
|
inline |
Initializes a new instance of the AppConfigBase class.
configurationRoot | The configuration root. |
|
inline |
Initializes a new instance of the AppConfigBase class.
configurationSection | The configuration section. |
|
inlinevirtual |
Creates a new object that is a copy of the current instance.
|
inlinevirtual |
Gets the default OAuth2 scope.
Implements Google.Api.Ads.Common.Lib.AppConfig.
Reimplemented in Google.Api.Ads.AdManager.Lib.AdManagerAppConfig.
|
inlinevirtual |
Gets the user agent text.
Implements Google.Api.Ads.Common.Lib.AppConfig.
Reimplemented in Google.Api.Ads.AdManager.Lib.AdManagerAppConfig.
|
inlineprotected |
Attempts to load the configuration section with the given name.
sectionName | The name of the configuration section to load. |
null
if none was found.
|
inlineprotected |
Initializes a new instance of the AppConfigBase class.
configuration | The configuration section. |
sectionName | The section name. |
|
inlineprotected |
Reads a setting from a given dictionary.
settings | The settings collection from which the keys are to be read. |
settingField | The field that holds the setting value. |
References Google.Api.Ads.Common.Config.ConfigSetting.Name.
|
inlineprotectedvirtual |
Read all settings from App.config.
settings | The parsed app.config settings. |
Reimplemented in Google.Api.Ads.AdManager.Lib.AdManagerAppConfig.
|
inlineprotected |
Sets the specified property and notify any listeners.
T | Type of the property. |
field | The field that store property value. |
newValue | The new value to be set. |
propertyName | Name of the property. |
|
getset |
Gets or sets whether gzip compression should be turned on for SOAP requests and responses.
|
getset |
Gets or sets whether usage of various client library features should be tracked.
The name of the property is kept different to match the setting name for other client libraries.
|
getset |
Gets or sets whether the credentials in the log file should be masked.
|
getset |
Gets or sets the OAuth2 access token.
|
getset |
Gets or sets the OAuth2 client ID.
|
getset |
Gets or sets the OAuth2 client secret.
|
getset |
Gets or sets the OAuth2 mode.
Referenced by Google.Api.Ads.AdManager.Examples.CSharp.OAuth.OAuthLogin.Page_Load().
|
getset |
Gets the OAuth2 private key for service account flow.
This setting is applicable only when using OAuth2 service accounts. This setting is read directly from the file referred to in OAuth2SecretsJsonPath setting.
|
getset |
Gets or sets the OAuth2 prn email.
This setting is applicable only when using OAuth2 service accounts.
|
getset |
Gets or sets the OAuth2 redirect URI.
This setting is applicable only when using OAuth2 web flow.
|
getset |
Gets or sets the OAuth2 refresh token.
This setting is applicable only when using OAuth2 web / application flow in offline mode.
Referenced by Google.Api.Ads.AdManager.Examples.CSharp.OAuth.Default.OnAuthorizeButtonClick(), and Google.Api.Ads.AdManager.Examples.CSharp.OAuth.OAuthLogin.Page_Load().
|
getset |
Gets or sets the OAuth2 scope.
|
getset |
Gets or sets the OAuth2 secrets JSON file path.
This setting is applicable only when using OAuth2 service accounts.
|
getset |
Gets or sets the OAuth2 server URL.
This property's setter is primarily used for testing purposes.
|
getset |
Gets the OAuth2 service account email.
This setting is applicable only when using OAuth2 service accounts. This setting is read directly from the file referred to in OAuth2SecretsJsonPath setting.
|
getset |
Gets or sets the web proxy to be used with the services.
|
getset |
Gets or sets the number of times to retry a call if an API call fails and can be retried.
|
get |
Gets the signature for this library.
|
getset |
Gets or sets the timeout for Ads services in milliseconds.
|
get |
Gets the number of seconds after Jan 1, 1970, 00:00:00
PropertyChangedEventHandler Google.Api.Ads.Common.Lib.AppConfigBase.PropertyChanged |
Occurs when a property value changes.