Class Parameter
- Namespace
- RestSharp
- Assembly
- RestSharp.dll
Parameter container for REST requests
public abstract record Parameter : IEquatable<Parameter>
- Inheritance
-
Parameter
- Implements
- Derived
- Inherited Members
Constructors
Parameter(Parameter)
protected Parameter(Parameter original)
Parameters
originalParameter
Parameter(string?, object?, ParameterType, bool)
Parameter container for REST requests
protected Parameter(string? Name, object? Value, ParameterType Type, bool Encode)
Parameters
NamestringValueobjectTypeParameterTypeEncodebool
Properties
ContentType
MIME content type of the parameter
public string? ContentType { get; protected init; }
Property Value
Encode
public bool Encode { get; init; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Name
public string? Name { get; init; }
Property Value
Type
public ParameterType Type { get; init; }
Property Value
Value
public object? Value { get; init; }
Property Value
Methods
CreateParameter(string?, object?, ParameterType, bool)
public static Parameter CreateParameter(string? name, object? value, ParameterType type, bool encode = true)
Parameters
namestringvalueobjecttypeParameterTypeencodebool
Returns
Deconstruct(out string?, out object?, out ParameterType, out bool)
public void Deconstruct(out string? Name, out object? Value, out ParameterType Type, out bool Encode)
Parameters
NamestringValueobjectTypeParameterTypeEncodebool
Equals(Parameter?)
public virtual bool Equals(Parameter? other)
Parameters
otherParameter
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
Return a human-readable representation of this parameter
public override string ToString()
Returns
- string
String
Operators
operator ==(Parameter?, Parameter?)
public static bool operator ==(Parameter? left, Parameter? right)
Parameters
Returns
operator !=(Parameter?, Parameter?)
public static bool operator !=(Parameter? left, Parameter? right)