目录

结构体 AgentType

命名空间
Microsoft.AutoGen.Contracts
程序集
Microsoft.AutoGen.Contracts.dll

将代理的类型表示为一个字符串。 这是一个围绕字符串的强类型包装器,确保在使用代理类型时具有类型安全性。

public struct AgentType
继承的成员

备注

此结构体是不可变的,并提供与 string 之间的隐式转换。

字段

Name

此代理类型的字符串表示形式。

public required string Name

字段值

string

运算符

explicit operator AgentType(Type)

显式地将 Type 转换为 AgentType

public static explicit operator AgentType(Type type)

参数

type Type

要转换的 .NET Type

返回值

AgentType

一个 AgentType 实例,包含提供的类型的名称。

implicit operator string(AgentType)

隐式地将 AgentType 转换为 string

public static implicit operator string(AgentType type)

参数

type AgentType

AgentType 实例。

返回值

string

代理类型的字符串表示形式。

implicit operator AgentType(string)

隐式地将 string 转换为 AgentType

public static implicit operator AgentType(string type)

参数

type string

代理类型的字符串表示形式。

返回值

AgentType

一个 AgentType 实例,包含给定的名称。