Represents an Ads API user.
More...
|
| AdsUser (AppConfigBase config) |
| Protected constructor. Use this version from a derived class if you want the library to use all settings from App.config. More...
|
|
| AdsUser (AppConfigBase config, Dictionary< string, string > headers) |
| Protected constructor. Use this version from a derived class if you want the library to use all settings from App.config. More...
|
|
void | RegisterServices (Type[] servicesFamilies) |
| Registers a family of services against this user. More...
|
|
void | SetHeadersFromConfig () |
| Set the user headers from App.config. More...
|
|
Represents an Ads API user.
Google.Api.Ads.Common.Lib.AdsUser.AdsUser |
( |
AppConfigBase |
config | ) |
|
|
inlineprotected |
Protected constructor. Use this version from a derived class if you want the library to use all settings from App.config.
Google.Api.Ads.Common.Lib.AdsUser.AdsUser |
( |
AppConfigBase |
config, |
|
|
Dictionary< string, string > |
headers |
|
) |
| |
|
inlineprotected |
Protected constructor. Use this version from a derived class if you want the library to use all settings from App.config.
This constructor exists for backward compatibility purposes.
abstract SoapListener [] Google.Api.Ads.Common.Lib.AdsUser.GetDefaultListeners |
( |
| ) |
|
|
pure virtual |
Creates an object of the requested type of service.
- Parameters
-
serviceSignature | Signature of the service being requested. |
- Returns
- An object of the requested type of service. The caller should cast this object to the desired type.
Creates an object of the requested type of service.
- Parameters
-
serviceSignature | Signature of the service being requested. |
serverUrl | The server url for Ads service. |
- Returns
- An object of the requested type of service. The caller should cast this object to the desired type.
ServiceFactory Google.Api.Ads.Common.Lib.AdsUser.GetServiceFactory |
( |
string |
serviceId | ) |
|
|
inline |
Gets the service factory for a service.
- Parameters
-
- Returns
- The service factory instance, or null if the service is not yet registered.
abstract Type [] Google.Api.Ads.Common.Lib.AdsUser.GetServiceTypes |
( |
| ) |
|
|
pure virtual |
void Google.Api.Ads.Common.Lib.AdsUser.RegisterService |
( |
string |
serviceId, |
|
|
ServiceFactory |
serviceFactory |
|
) |
| |
|
inline |
Register a service with AdsUser.
- Parameters
-
serviceId | A unique id for the service being registered. |
serviceFactory | The factory that will create this service. |
void Google.Api.Ads.Common.Lib.AdsUser.RegisterServices |
( |
Type[] |
servicesFamilies | ) |
|
|
inlineprotected |
Registers a family of services against this user.
- Parameters
-
servicesFamilies | The family of services that should be registered against this user. |
Every family of services that should be registered with an AdsUser should be like follows:
public class vX {
public Type factoryType = typeof(SomeServiceVxFactory);
public readonly ServiceSignature Service1;
public readonly ServiceSignature Service2;
}
The method uses reflection to
- Find all the fields of type ServiceSignature.
- Extract the factory type from factoryType field.
- Register each found service type with the user.
References Google.Api.Ads.Common.Lib.ServiceSignature.Id.
void Google.Api.Ads.Common.Lib.AdsUser.SetHeadersFromConfig |
( |
| ) |
|
|
inlineprotected |
Set the user headers from App.config.
AppConfig Google.Api.Ads.Common.Lib.AdsUser.Config |
|
get |
Gets or sets the application configuration for this user.
List<SoapListener> Google.Api.Ads.Common.Lib.AdsUser.Listeners |
|
get |
Gets or sets the OAuth provider.
The documentation for this class was generated from the following file: