Class ChannelOption

public sealed class ChannelOption : IEquatable<ChannelOption>

Channel option specified when creating a channel. Corresponds to grpc_channel_args from grpc/grpc.h. Commonly used channel option names are defined in ChannelOptions, but any of the GRPC_ARG_* channel options names defined in grpc_types.h can be used.

Inheritance

Object > ChannelOption

Namespace

Grpc.Core

Assembly

Grpc.Core.dll

Constructors

ChannelOption(String, Int32)

public ChannelOption(string name, int intValue)

Creates a channel option with an integer value.

Parameters
TypeNameDescription
Stringname

Name.

Int32intValue

Integer value.

ChannelOption(String, String)

public ChannelOption(string name, string stringValue)

Creates a channel option with a string value.

Parameters
TypeNameDescription
Stringname

Name.

StringstringValue

String value.

Properties

IntValue

public int IntValue { get; }

Gets the integer value the ChannelOption.

Property Value
TypeDescription
Int32

Name

public string Name { get; }

Gets the name of the ChannelOption.

Property Value
TypeDescription
String

StringValue

public string StringValue { get; }

Gets the string value the ChannelOption.

Property Value
TypeDescription
String

Type

public ChannelOption.OptionType Type { get; }

Gets the type of the ChannelOption.

Property Value
TypeDescription
ChannelOption.OptionType

Methods

Equals(ChannelOption)

public bool Equals(ChannelOption other)

Determines whether the specified object is equal to the current object.

Parameter
TypeNameDescription
ChannelOptionother
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object obj)

Determines whether the specified object is equal to the current object.

Parameter
TypeNameDescription
Objectobj
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()

A hash code for the current object.

Returns
TypeDescription
Int32

Operators

Equality(ChannelOption, ChannelOption)

public static bool operator ==(ChannelOption option1, ChannelOption option2)

Equality operator.

Parameters
TypeNameDescription
ChannelOptionoption1
ChannelOptionoption2
Returns
TypeDescription
Boolean

Inequality(ChannelOption, ChannelOption)

public static bool operator !=(ChannelOption option1, ChannelOption option2)

Inequality operator.

Parameters
TypeNameDescription
ChannelOptionoption1
ChannelOptionoption2
Returns
TypeDescription
Boolean