Struct MessageBrokerClientRoutingTarget
- Namespace
- LfrlAnvil.MessageBroker.Client
- Assembly
- LfrlAnvil.MessageBroker.Client.dll
Represents a message routing target, based on either a target client id or name.
public readonly struct MessageBrokerClientRoutingTarget
- Inherited Members
Properties
Id
Target client id. Equal to 0 if not used.
public int Id { get; }
Property Value
IsFromName
Specifies whether this routing target is based on a name.
public bool IsFromName { get; }
Property Value
Name
Target client name. Empty if not used.
public string Name { get; }
Property Value
Methods
FromId(int)
Creates a new routing target based on an id.
[Pure]
public static MessageBrokerClientRoutingTarget FromId(int id)
Parameters
idintTarget client id.
Returns
Exceptions
- ArgumentOutOfRangeException
When
idis less than or equal to 0.
FromName(string)
Creates a new routing target based on a name.
[Pure]
public static MessageBrokerClientRoutingTarget FromName(string name)
Parameters
namestringTarget client name.
Returns
Exceptions
- ArgumentOutOfRangeException
When
name's length is less than 1 or greater than 512.
ToString()
Returns a string representation of this MessageBrokerClientRoutingTarget instance.
[Pure]
public override string ToString()
Returns
- string
String representation.
Operators
implicit operator MessageBrokerClientRoutingTarget(int)
Converts provided id to a routing target.
[Pure]
public static implicit operator MessageBrokerClientRoutingTarget(int id)
Parameters
idintTarget client id.
Returns
Exceptions
- ArgumentOutOfRangeException
When
idis less than or equal to 0.
implicit operator MessageBrokerClientRoutingTarget(string)
Converts provided name to a routing target.
[Pure]
public static implicit operator MessageBrokerClientRoutingTarget(string name)
Parameters
namestringTarget client name.
Returns
Exceptions
- ArgumentOutOfRangeException
When
name's length is less than 1 or greater than 512.