Class ParameterUtils
Utility class for iterating on RequestParameterAttribute properties in a request object.
Inherited Members
Namespace: Google.Apis.Requests.Parameters
Assembly: Google.Apis.Core.dll
Syntax
public static class ParameterUtils
Methods
CreateFormUrlEncodedContent(object)
Creates a FormUrlEncodedContent with all the specified parameters in the input request. It uses reflection to iterate over all properties with RequestParameterAttribute attribute.
Declaration
public static FormUrlEncodedContent CreateFormUrlEncodedContent(object request)
Parameters
| Type | Name | Description |
|---|---|---|
| object | request | 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)
Creates a parameter dictionary by using reflection to iterate over all properties with RequestParameterAttribute attribute.
Declaration
public static IDictionary<string, object> CreateParameterDictionary(object request)
Parameters
| Type | Name | Description |
|---|---|---|
| object | request | A request object which contains properties with RequestParameterAttribute attribute. Those properties will be set in the output dictionary. |
Returns
| Type | Description |
|---|---|
| IDictionary<string, object> |
InitParameters(RequestBuilder, object)
Sets query parameters in the given builder with all all properties with the RequestParameterAttribute attribute.
Declaration
public static void InitParameters(RequestBuilder builder, object request)
Parameters
| Type | Name | Description |
|---|---|---|
| RequestBuilder | builder | The request builder |
| object | request | A request object which contains properties with RequestParameterAttribute attribute. Those properties will be set in the given request builder object |