Ads API .NET library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities Class Reference

Utility class for assisting in running code examples. More...

Static Public Member Functions

static string GetRandomString ()
 Gets a random string. Useful for generating unique names for campaigns, ad groups, etc. More...
 
static string GetShortRandomString ()
 Gets a random string. Useful for generating unique names for campaigns, ad groups, etc. More...
 
static string FormatException (Exception ex)
 Formats the exception as a printable message. More...
 
static string GetHomeDir ()
 Gets the current user's home directory. More...
 
static bool IsNullable (Type type)
 Determines whether the specified type is Nullable. More...
 
static Type GetUnderlyingType (Type type)
 Gets the underlying type of a given type. More...
 
static List< object > GetParameters (MethodInfo methodInfo)
 Gets the parameters for running the code example. More...
 

Detailed Description

Utility class for assisting in running code examples.

Member Function Documentation

static string Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.FormatException ( Exception  ex)
inlinestatic

Formats the exception as a printable message.

Parameters
exThe exception.
Returns
The formatted exception string.
static string Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.GetHomeDir ( )
inlinestatic

Gets the current user's home directory.

Returns
The current user's home directory.
static List<object> Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.GetParameters ( MethodInfo  methodInfo)
inlinestatic

Gets the parameters for running the code example.

Parameters
methodInfoThe method info for Run method in code example.
Returns
An array of parameters for running the code example.
static string Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.GetRandomString ( )
inlinestatic

Gets a random string. Useful for generating unique names for campaigns, ad groups, etc.

Returns
The current timestamp as a string.
static string Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.GetShortRandomString ( )
inlinestatic

Gets a random string. Useful for generating unique names for campaigns, ad groups, etc.

Returns
The current timestamp as a string.
static Type Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.GetUnderlyingType ( Type  type)
inlinestatic

Gets the underlying type of a given type.

Parameters
typeThe type.
Returns
The type, if the given type is not nullable, the underlying type if it is nullable.
static bool Google.Api.Ads.AdWords.Examples.CSharp.ExampleUtilities.IsNullable ( Type  type)
inlinestatic

Determines whether the specified type is Nullable.

Parameters
typeThe type.
Returns
True, if the type is nullable, false otherwise.

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