Struct AgentId
public struct AgentId
- Inherited Members
Constructors
AgentId(AgentType, string)
public AgentId(AgentType type, string key)
Parameters
AgentId(string, string)
Initializes a new instance of the AgentId struct.
public AgentId(string type, string key)
Parameters
AgentId((string Type, string Key))
Initializes a new instance of the AgentId struct from a tuple.
public AgentId((string Type, string Key) kvPair)
Parameters
Fields
Key
Agent instance identifier. Strings may only be composed of alphanumeric letters (a-z) and (0-9), or underscores (_).
public string Key
Field Value
Type
An identifier that associates an agent with a specific factory function. Strings may only be composed of alphanumeric letters (a-z) and (0-9), or underscores (_).
public string Type
Field Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current AgentId.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
FromStr(string)
Convert a string of the format "type/key" into an AgentId.
public static AgentId FromStr(string maybeAgentId)
Parameters
maybeAgentId
stringThe agent ID string.
Returns
GetHashCode()
Returns a hash code for this AgentId.
public override int GetHashCode()
Returns
- int
A hash code for the current instance.
ToString()
Returns the string representation of the AgentId.
public override string ToString()
Returns
- string
A string in the format "type/key".
Operators
operator ==(AgentId, AgentId)
public static bool operator ==(AgentId left, AgentId right)
Parameters
Returns
explicit operator AgentId(string)
Explicitly converts a string to an AgentId.
public static explicit operator AgentId(string id)
Parameters
id
stringThe string representation of an agent ID.
Returns
operator !=(AgentId, AgentId)
public static bool operator !=(AgentId left, AgentId right)