<PackageReference Include="Grpc.Net.Client" Version="2.67.0" />

Grpc.Net.Client.Balancer.BalancerAttributes

public sealed class BalancerAttributes : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>
Collection of load balancing metadata attributes.

Note: Experimental API that can change or be removed without any prior notice.

public static readonly BalancerAttributes Empty

Gets a read-only collection of metadata attributes.

Initializes a new instance of the BalancerAttributes class.

public bool Remove<TValue>(BalancerAttributesKey<TValue> key)

Removes the value associated with the specified key.

public void Set<TValue>(BalancerAttributesKey<TValue> key, TValue value)

Sets the value associated with the specified key.

public bool TryGetValue<TValue>(BalancerAttributesKey<TValue> key, out TValue value)

Gets the value associated with the specified key.