CompilationSection.Batch 属性

定义

获取或设置一个值,该值指示是否尝试批编译。Gets or sets a value indicating whether batch compilation is attempted.

public:
 property bool Batch { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("batch", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public bool Batch { get; set; }
[<System.Configuration.ConfigurationProperty("batch", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.Batch : bool with get, set
Public Property Batch As Boolean

属性值

Boolean

如果尝试批编译,则为 true;否则为 falsetrue if batch compilation is attempted; otherwise, false. 默认值为 trueThe default is true.

属性

示例

下面的代码示例演示如何使用 Batch 属性。The following code example demonstrates how to use the Batch property. 此代码示例是为类提供的更大示例的一部分 CompilationSectionThis code example is part of a larger example provided for the CompilationSection class.

// Display Batch property.
Console.WriteLine("Batch: {0}", configSection.Batch);

// Set Batch property.
configSection.Batch = true;
' Display Batch property.
Console.WriteLine("Batch: {0}", _
 configSection.Batch)

' Set Batch property.
configSection.Batch = True

注解

将此特性设置为 true ,以更改访问未编译的文件时所需编译导致的延迟。Set this attribute to true to change the delay caused by the required compilation when you access an uncompiled file. 将此属性设置为 true 指示 ASP.NET 以批处理模式预编译所有未编译的文件。Setting this attribute to true instructs ASP.NET to precompile all the uncompiled files in batch mode. 首次编译文件时会发生延迟;但是,在编译文件后,会消除延迟。A delay occurs when the files are first compiled; however once the files are compiled, the delay is eliminated.

适用于