Class ParameterUtils (1.60.0)

public static class ParameterUtils

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

Inheritance

object > ParameterUtils

Namespace

GoogleApisRequestsParameters

Assembly

Google.Apis.Core.dll

Methods

CreateFormUrlEncodedContent(object)

public static FormUrlEncodedContent CreateFormUrlEncodedContent(object request)

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

Parameter
NameDescription
requestobject

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

Returns
TypeDescription
System.Net.Http.FormUrlEncodedContent

A System.Net.Http.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
NameDescription
requestobject

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

Returns
TypeDescription
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
NameDescription
builderRequestBuilder

The request builder

requestobject

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