C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
AnalyzeRe.Rest.RequestParameters Class Reference

Helper class which makes it easier to build a set of request parameters. More...

Public Member Functions

 RequestParameters (IEnumerable< Parameter > parameters=null)
 Build a set of request parameters.
 
RequestParameters AddGetParameter (string name, string value)
 An obsolete alias for AddQueryParameter. Adds a new request parameter with the type ParameterType.QueryString.
 
RequestParameters AddHeader (string name, string value=null)
 Adds the specified name/value pair as a HEADER.
 
RequestParameters AddParameter (Parameter parameter)
 Adds the specified parameter to this list and returns the list.
 
RequestParameters AddParameter (string name, object value, ParameterType type, string contentType=null)
 Adds a new parameter with the specified properties to this list and returns the list.
 
RequestParameters AddParameters (IEnumerable< Parameter > collection)
 Adds the specified parameters to this list and returns the list.
 
RequestParameters AddQueryParameter (string name, string value)
 Adds the specified name/value pair as a new request parameter with the type ParameterType.QueryString if the value is not null.
 
string GetHashString ()
 Creates and returns a serialized list of all parameters currently in this list sorted by parameter name and using the default ToString implementation for the parameter values. This string can be used as a hash key of the parameters in this list.
 

Detailed Description

Helper class which makes it easier to build a set of request parameters.

Definition at line 9 of file RequestParameters.cs.

Inheritance diagram for AnalyzeRe.Rest.RequestParameters:

Constructor & Destructor Documentation

◆ RequestParameters()

AnalyzeRe.Rest.RequestParameters.RequestParameters ( IEnumerable< Parameter >  parameters = null)
inline

Build a set of request parameters.

Parameters
parameters(Optional) A set of parameters to add.

Definition at line 13 of file RequestParameters.cs.

Member Function Documentation

◆ AddGetParameter()

RequestParameters AnalyzeRe.Rest.RequestParameters.AddGetParameter ( string  name,
string  value 
)

An obsolete alias for AddQueryParameter. Adds a new request parameter with the type ParameterType.QueryString.

Parameters
nameThe parameter name.
valueThe parameter value.

◆ AddHeader()

RequestParameters AnalyzeRe.Rest.RequestParameters.AddHeader ( string  name,
string  value = null 
)
inline

Adds the specified name/value pair as a HEADER.

Parameters
nameThe header to include.
value(Optional) The header value to supply (if any).
Returns
A reference to this list of request parameters.

Definition at line 46 of file RequestParameters.cs.

◆ AddParameter() [1/2]

RequestParameters AnalyzeRe.Rest.RequestParameters.AddParameter ( Parameter  parameter)
inline

Adds the specified parameter to this list and returns the list.

Parameters
parameterThe parameter to add to this list.
Returns
A reference to this list of request parameters.

Definition at line 54 of file RequestParameters.cs.

◆ AddParameter() [2/2]

RequestParameters AnalyzeRe.Rest.RequestParameters.AddParameter ( string  name,
object  value,
ParameterType  type,
string  contentType = null 
)
inline

Adds a new parameter with the specified properties to this list and returns the list.

Parameters
nameThe parameter name.
valueThe parameter value.
typeThe type of parameter.
contentTypeThe MIME content type of the parameter.
Returns
A reference to this list of request parameters.

Definition at line 69 of file RequestParameters.cs.

◆ AddParameters()

RequestParameters AnalyzeRe.Rest.RequestParameters.AddParameters ( IEnumerable< Parameter >  collection)
inline

Adds the specified parameters to this list and returns the list.

Parameters
collectionThe parameters to add to this list.
Returns
A reference to this list of request parameters.

Definition at line 79 of file RequestParameters.cs.

◆ AddQueryParameter()

RequestParameters AnalyzeRe.Rest.RequestParameters.AddQueryParameter ( string  name,
string  value 
)
inline

Adds the specified name/value pair as a new request parameter with the type ParameterType.QueryString if the value is not null.

Parameters
nameThe parameter name.
valueThe parameter value. For convenience, a supplied value of null will cause this function call to be silently ignored, i.e. the parameter will not be added to the request.
Returns
A reference to this list of request parameters.

Definition at line 36 of file RequestParameters.cs.

◆ GetHashString()

string AnalyzeRe.Rest.RequestParameters.GetHashString ( )
inline

Creates and returns a serialized list of all parameters currently in this list sorted by parameter name and using the default ToString implementation for the parameter values. This string can be used as a hash key of the parameters in this list.

Returns
A hash string for the collection. See method summary.

Definition at line 91 of file RequestParameters.cs.


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