AuthorizedType 类

定义

警告

此 API 现已过时。

表示已编译的工作流中被工作流编译器允许或禁止(取决于 Authorized 属性的值)的一组类型。Represents a set of types that are either allowed or disallowed in compiled workflows by the workflow compiler (depending on the value of the Authorized property). 此类不能被继承。This class cannot be inherited.

public ref class AuthorizedType sealed
public sealed class AuthorizedType
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class AuthorizedType
type AuthorizedType = class
Public NotInheritable Class AuthorizedType
继承
AuthorizedType
属性

注解

备注

本材料讨论的类型和命名空间已废弃不用。This material discusses types and namespaces that are obsolete. 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

在工作流编译的验证阶段,如果工作流源文档或伴随规则文件直接引用了授权的类型列表中不存在的任何 .NET Framework 类型,则该工作流源文档将被拒绝。During the validation phase of workflow compilation, a workflow source document is rejected if it or the companion rules file directly references any .NET Framework types not present on a list of authorized types. 授权类型列表是一个 XML 文档, 其中每个条目表示一个Assembly Namespace、、一个TypeName和一个授权的 {|false``true} 指示器。The list of authorized types is an XML document where each entry indicates an Assembly, a Namespace, a TypeName, and an Authorized {true|false} indicator. 此类与列表上的一项对应。This class corresponds to an entry on the list. 另外请注意,允许指定通配符以包括或排除完整的命名空间。Also note that wildcard character designations are allowed, to include or exclude complete namespaces. 例如, 使用Type="System.*"包括中的System所有类型, 包括子命名空间中包含的类型。For example, using Type="System.*" includes all types in System, including types contained in child namespaces.

授权类型列表的使用受 WorkflowCompiler 选项 '/checktypes' 的控制。The use of a list of authorized types is controlled by the WorkflowCompiler option '/checktypes'

构造函数

AuthorizedType()

初始化 AuthorizedType 类的新实例。Initializes a new instance of the AuthorizedType class.

属性

Assembly

获取或设置包含由此类表示类型的程序集的名称。Gets or sets the name of the assembly that contains the type(s) represented by this class.

Authorized

获取或设置一个值,该值指示是否授权此类指定的类型参与工作流编译。Gets or sets the value that indicates whether the type designated by this class is authorized to participate in a workflow compilation.

Namespace

获取或设置此实例中表示的类型的命名空间的名称。Gets or sets the name of the namespace of the type represented in this instance.

RegularExpression

获取与此实例关联的 RegexGets the Regex associated with this instance.

TypeName

获取或设置由此实例表示的类型的名称。Gets or sets the name of the type being represented by this instance.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于