public class CustomOption : IEquatable<GrpcChannelOptions.CustomOption>
A custom option, with a name and a value of either a 32-bit integer or a string.
Implements
IEquatable<GrpcChannelOptions.CustomOption>Namespace
Google.Api.Gax.GrpcAssembly
Google.Api.Gax.Grpc.dll
Constructors
CustomOption(String, Int32)
public CustomOption(string name, int value)
Creates a custom integer option.
Parameters | |
---|---|
Name | Description |
name | String The name of the option. Must not be null. |
value | Int32 Value of the option. |
CustomOption(String, String)
public CustomOption(string name, string value)
Creates a custom string option.
Parameters | |
---|---|
Name | Description |
name | String The name of the option. Must not be null. |
value | String 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 | |
---|---|
Type | Description |
Int32 |
Name
public string Name { get; }
Name of the option. This is never null.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |
Type
public GrpcChannelOptions.CustomOption.OptionType Type { get; }
The type of value represented within this option.
Property Value | |
---|---|
Type | Description |
GrpcChannelOptions.CustomOption.OptionType |
Methods
Equals(GrpcChannelOptions.CustomOption)
public bool Equals(GrpcChannelOptions.CustomOption other)
Parameter | |
---|---|
Name | Description |
other | GrpcChannelOptions.CustomOption |
Returns | |
---|---|
Type | Description |
Boolean |
Equals(Object)
public override bool Equals(object obj)
Parameter | |
---|---|
Name | Description |
obj | Object |
Returns | |
---|---|
Type | Description |
Boolean |
GetHashCode()
public override int GetHashCode()
Returns | |
---|---|
Type | Description |
Int32 |