Class ParameterUtils (1.68.0)

public static class ParameterUtils

Utility class for iterating on RequestParameterAttribute properties in a request object.

Inheritance

object > ParameterUtils

Namespace

Google.Apis.Requests.Parameters

Assembly

Google.Apis.Core.dll

Methods

CreateFormUrlEncodedContent(object)

public static FormUrlEncodedContent CreateFormUrlEncodedContent(object request)

Creates a FormUrlEncodedContent with all the specified parameters in the input request. It uses reflection to iterate over all properties with RequestParameterAttribute attribute.

Parameter
Name Description
request object

A request object which contains properties with RequestParameterAttribute attribute. Those properties will be serialized to the returned FormUrlEncodedContent.

Returns
Type Description
FormUrlEncodedContent

A FormUrlEncodedContent which contains the all the given object required values.

CreateParameterDictionary(object)

public static IDictionary<string, object> CreateParameterDictionary(object request)

Creates a parameter dictionary by using reflection to iterate over all properties with RequestParameterAttribute attribute.

Parameter
Name Description
request object

A request object which contains properties with RequestParameterAttribute attribute. Those properties will be set in the output dictionary.

Returns
Type Description
IDictionarystringobject

InitParameters(RequestBuilder, object)

public static void InitParameters(RequestBuilder builder, object request)

Sets query parameters in the given builder with all all properties with the RequestParameterAttribute attribute.

Parameters
Name Description
builder RequestBuilder

The request builder

request object

A request object which contains properties with RequestParameterAttribute attribute. Those properties will be set in the given request builder object