[This is preliminary documentation and is subject to change.]

Gets an agent with the specified name. If an agent cannot be found, this method returns null.

Namespace: Clarion
Assembly: CLARIONLibrary (in CLARIONLibrary.dll) Version: 6.1.0.7 (6.1.0.7)

Syntax

C#
public static Agent GetAgent(
	IComparable name
)

Parameters

name
Type: System..::..IComparable
The name of an agent to get

Return Value

An agent with the specified name or null if an agent cannot be found

Remarks

Caution
This method CANNOT guarantee correct retrieval unless ALL agents are initialized using a unique name. Since a name is optional for an agent and since multiple agents can have the same name, calling this method will only returns the FIRST instance of an agent with the specified name (if one is found). Keep this in mind if you plan to use this method to retrieve agents from the world.

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionIf the singleton world instance has not been initialized

See Also