Table of Contents

Class BodyParameter

Namespace
RestSharp
Assembly
RestSharp.dll
public record BodyParameter : Parameter, IEquatable<Parameter>, IEquatable<BodyParameter>
Inheritance
BodyParameter
Implements
Derived
Inherited Members

Constructors

BodyParameter(BodyParameter)

protected BodyParameter(BodyParameter original)

Parameters

original BodyParameter

BodyParameter(string?, object, string, DataFormat)

public BodyParameter(string? name, object value, string contentType, DataFormat dataFormat = DataFormat.None)

Parameters

name string
value object
contentType string
dataFormat DataFormat

Properties

ContentEncoding

Custom content encoding

public string? ContentEncoding { get; init; }

Property Value

string

DataFormat

Body parameter data type

public DataFormat DataFormat { get; init; }

Property Value

DataFormat

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Methods

Equals(BodyParameter?)

public virtual bool Equals(BodyParameter? other)

Parameters

other BodyParameter

Returns

bool

Equals(Parameter?)

public override sealed bool Equals(Parameter? other)

Parameters

other Parameter

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

Return a human-readable representation of this parameter

public override string ToString()

Returns

string

String

Operators

operator ==(BodyParameter?, BodyParameter?)

public static bool operator ==(BodyParameter? left, BodyParameter? right)

Parameters

left BodyParameter
right BodyParameter

Returns

bool

operator !=(BodyParameter?, BodyParameter?)

public static bool operator !=(BodyParameter? left, BodyParameter? right)

Parameters

left BodyParameter
right BodyParameter

Returns

bool