Class GrpcChannelOptions.CustomOption (4.2.0)

public class CustomOption : IEquatable<GrpcChannelOptions.CustomOption>

A custom option, with a name and a value of either a 32-bit integer or a string.

Inheritance

Object > GrpcChannelOptions.CustomOption

Namespace

Google.Api.Gax.Grpc

Assembly

Google.Api.Gax.Grpc.dll

Constructors

CustomOption(String, Int32)

public CustomOption(string name, int value)

Creates a custom integer option.

Parameters
NameDescription
nameString

The name of the option. Must not be null.

valueInt32

Value of the option.

CustomOption(String, String)

public CustomOption(string name, string value)

Creates a custom string option.

Parameters
NameDescription
nameString

The name of the option. Must not be null.

valueString

Value of the option. Must not be null.

Properties

IntegerValue

public int IntegerValue { get; }

Value of the option, for integer options, or 0 for other options.

Property Value
TypeDescription
Int32

Name

public string Name { get; }

Name of the option. This is never null.

Property Value
TypeDescription
String

StringValue

public string StringValue { get; }

Value of the option, for string options. This is never null for string options, and always null for other options.

Property Value
TypeDescription
String

Type

public GrpcChannelOptions.CustomOption.OptionType Type { get; }

The type of value represented within this option.

Property Value
TypeDescription
GrpcChannelOptions.CustomOption.OptionType

Methods

Equals(GrpcChannelOptions.CustomOption)

public bool Equals(GrpcChannelOptions.CustomOption other)
Parameter
NameDescription
otherGrpcChannelOptions.CustomOption
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
Boolean
Overrides

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32
Overrides