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.
Namespace
Grpc.CoreAssembly
Grpc.Core.dll
Constructors
ChannelOption(String, Int32)
public ChannelOption(string name, int intValue)
Creates a channel option with an integer value.
Type | Name | Description |
---|---|---|
String | name | Name. |
Int32 | intValue | Integer value. |
ChannelOption(String, String)
public ChannelOption(string name, string stringValue)
Creates a channel option with a string value.
Type | Name | Description |
---|---|---|
String | name | Name. |
String | stringValue | String value. |
Properties
IntValue
public int IntValue { get; }
Gets the integer value the ChannelOption
.
Type | Description |
---|---|
Int32 |
Name
public string Name { get; }
Gets the name of the ChannelOption
.
Type | Description |
---|---|
String |
StringValue
public string StringValue { get; }
Gets the string value the ChannelOption
.
Type | Description |
---|---|
String |
Type
public ChannelOption.OptionType Type { get; }
Gets the type of the ChannelOption
.
Type | Description |
---|---|
ChannelOption.OptionType |
Methods
Equals(ChannelOption)
public bool Equals(ChannelOption other)
Determines whether the specified object is equal to the current object.
Type | Name | Description |
---|---|---|
ChannelOption | other |
Type | Description |
---|---|
Boolean |
Equals(Object)
public override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
Type | Name | Description |
---|---|---|
Object | obj |
Type | Description |
---|---|
Boolean |
GetHashCode()
public override int GetHashCode()
A hash code for the current object.
Type | Description |
---|---|
Int32 |
Operators
Equality(ChannelOption, ChannelOption)
public static bool operator ==(ChannelOption option1, ChannelOption option2)
Equality operator.
Type | Name | Description |
---|---|---|
ChannelOption | option1 | |
ChannelOption | option2 |
Type | Description |
---|---|
Boolean |
Inequality(ChannelOption, ChannelOption)
public static bool operator !=(ChannelOption option1, ChannelOption option2)
Inequality operator.
Type | Name | Description |
---|---|---|
ChannelOption | option1 | |
ChannelOption | option2 |
Type | Description |
---|---|
Boolean |