RestOperationParameters

TODO: add description

Inherits: AnyValueMap

Description

TODO: add description

Constructors

Creates a new instance of this class.

public RestOperationParameters()

Creates a new instance of this class.

public RestOperationParameters(IDictionary values)

  • values: IDictionary - TODO: add description

Fields

BodyParameters

Body parameters

public BodyParameters: AnyValueMap

Headers

Headers

public Headers: AnyValueMap

RequestBody

Request body

public RequestBody: string

RequestFiles

Request files

public RequestFiles: IFormFileCollection

QueryParameters

Query parameters

public QueryParameters: AnyValueMap

Instance methods

AssignTo

Assigns a value to a property.

public void AssignTo(object value)

  • value: object - value to be assigned.

ContainsKey

Checks if the object contains a given key.

public new bool ContainsKey(string key)

  • key: string - key
  • returns: bool - ture if the key was found and false otherwise.

Get

Gets a property for a given path.

public override object Get(string path)

  • path: string - Path
  • returns: object - property or null if path is empty.

GetAsNullableParameters

Gets the requested parameters or null if not found.

public RestOperationParameters GetAsNullableParameters(string key)

GetAsParameters

Gets the requested parameters.

public RestOperationParameters GetAsParameters(string key)

GetAsParametersWithDefault

Gets the requested parameters or the given defauls if not found.

public RestOperationParameters GetAsParametersWithDefault(string key, RestOperationParameters defaultValue)

Override

Overrides the given parameters.

public RestOperationParameters Override(RestOperationParameters parameters)

Overrides the given parameters recursively.

public RestOperationParameters Override(RestOperationParameters parameters, bool recursive)

Omit

Removes the specified parameters.

public RestOperationParameters Omit(params string[] paths)

Pick

Picks the specified parameters.

public RestOperationParameters Pick(params string[] paths)

Set

Sets the specified properties.

public override void Set(string path, object value)

  • path: string - Properties to set.
  • value: object - values of the properties to set.

SetDefaults

Sets defaults values for parameters.

public RestOperationParameters SetDefaults(RestOperationParameters defaultParameters)

public RestOperationParameters SetDefaults(RestOperationParameters defaultParameters, bool recursive)

ToJson

Converts a JSON object into a string.

public string ToJson()

  • returns: string - string

Static methods

FromBody

Adds body parameters from a JSON string.

public static RestOperationParameters FromBody(string json)

FromConfig

Adds parameters from a ConfigParams object.

public static RestOperationParameters FromConfig(ConfigParams config)

FromJson

Adds parameters from a JSON string.

public static RestOperationParameters FromJson(string json)

FromTuples

Adds parameters from a tuple.

public new static RestOperationParameters FromTuples(params object[] tuples)

  • tuples: params object[] - tuple with parameters and their values.
  • returns: RestOperationParameters - updated object.

MergeParams

Merges two RestOperationParameters objects.

public static RestOperationParameters MergeParams(params RestOperationParameters[] parameters)