CompilationSection.Batch 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示是否尝试批处理编译。
public:
property bool Batch { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("batch", DefaultValue=true)]
public bool Batch { get; set; }
[<System.Configuration.ConfigurationProperty("batch", DefaultValue=true)>]
member this.Batch : bool with get, set
Public Property Batch As Boolean
属性值
true 如果尝试批处理编译,则为否则,为 false. 默认值为 true。
- 属性
示例
下面的代码示例演示如何使用该 Batch 属性。 该代码示例是 CompilationSection 类中的一个较大示例的一部分。
// 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 在访问未编译文件时更改所需编译导致的延迟。 将此属性设置为 true 指示 ASP.NET 在批处理模式下预编译所有未编译的文件。 首次编译文件时发生延迟;但是,编译文件后,将消除延迟。