RegexCompilationInfo 类

定义

提供有关使用正则表达式将正则表达式编译为独立程序集的信息。Provides information about a regular expression that is used to compile a regular expression to a stand-alone assembly.

public ref class RegexCompilationInfo
[System.Serializable]
public class RegexCompilationInfo
type RegexCompilationInfo = class
Public Class RegexCompilationInfo
继承
RegexCompilationInfo
属性

注解

CompileToAssembly 方法传递 RegexCompilationInfo 对象的数组,以提供有关要包含在程序集中的每个正则表达式的信息。An array of RegexCompilationInfo objects is passed to the CompileToAssembly method to provide information about each regular expression to be included in the assembly. 程序集中包含的每个已编译的正则表达式均表示为从 Regex派生的类。Each compiled regular expression that is included in the assembly is represented as a class derived from Regex. RegexCompilationInfo 类型的属性定义正则表达式的类名称、其完全限定名称(即其命名空间及其类型名称)、其正则表达式模式、任何其他选项(例如正则表达式是否不区分大小写)以及指定正则表达式引擎应在多长时间内搜索匹配项的超时间隔。The properties of the RegexCompilationInfo type define the regular expression's class name, its fully qualified name (that is, its namespace and its type name), its regular expression pattern, any additional options (such as whether the regular expression is case-insensitive), and a time-out interval that specifies how long the regular expression engine should search for a match.

可以通过调用其重载类构造函数来实例化 RegexCompilationInfo 的对象。You can instantiate a RegexCompilationInfo object by calling its overloaded class constructor.

构造函数

RegexCompilationInfo(String, RegexOptions, String, String, Boolean)

初始化 RegexCompilationInfo 类的新实例,该类包含有关要在程序集内包括的正则表达式的信息。Initializes a new instance of the RegexCompilationInfo class that contains information about a regular expression to be included in an assembly.

RegexCompilationInfo(String, RegexOptions, String, String, Boolean, TimeSpan)

初始化 RegexCompilationInfo 类的新实例,该类包含有关要在程序集内包括的指定的超时值的信息。Initializes a new instance of the RegexCompilationInfo class that contains information about a regular expression with a specified time-out value to be included in an assembly.

属性

IsPublic

获取或设置一个值,该值指示已编译的正则表达式是否具有公共可见性。Gets or sets a value that indicates whether the compiled regular expression has public visibility.

MatchTimeout

获取或设置正则表达式的默认超时间隔。Gets or sets the regular expression's default time-out interval.

Name

获取或设置表示已编译的正则表达式的类型名称。Gets or sets the name of the type that represents the compiled regular expression.

Namespace

获取或设置新类型所属的命名空间。Gets or sets the namespace to which the new type belongs.

Options

获取或设置编译正则表达式时使用的选项。Gets or sets the options to use when compiling the regular expression.

Pattern

获取或设置要编译的正则表达式。Gets or sets the regular expression to compile.

方法

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()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅