Table of Contents

Struct AgentType

Namespace
Microsoft.AutoGen.Contracts
Assembly
Microsoft.AutoGen.Contracts.dll

Represents the type of an agent as a string. This is a strongly-typed wrapper around a string, ensuring type safety when working with agent types.

public struct AgentType
Inherited Members

Remarks

This struct is immutable and provides implicit conversion to and from string.

Fields

Name

The string representation of this agent type.

public required string Name

Field Value

string

Operators

explicit operator AgentType(Type)

Explicitly converts a Type to an AgentType.

public static explicit operator AgentType(Type type)

Parameters

type Type

The .NET Type to convert.

Returns

AgentType

An AgentType instance with the name of the provided type.

implicit operator string(AgentType)

Implicitly converts an AgentType to a string.

public static implicit operator string(AgentType type)

Parameters

type AgentType

The AgentType instance.

Returns

string

The string representation of the agent type.

implicit operator AgentType(string)

Implicitly converts a string to an AgentType.

public static implicit operator AgentType(string type)

Parameters

type string

The string representation of the agent type.

Returns

AgentType

An AgentType instance with the given name.