BuildManager.BatchCompilationEnabled 属性

定义

获取或设置一个值,该值指示是否启用批处理编译。

public:
 static property Nullable<bool> BatchCompilationEnabled { Nullable<bool> get(); void set(Nullable<bool> value); };
public static bool? BatchCompilationEnabled { get; set; }
static member BatchCompilationEnabled : Nullable<bool> with get, set
Public Shared Property BatchCompilationEnabled As Nullable(Of Boolean)

属性值

true 如果始终启用批处理编译, false 则为从不启用批处理编译,或者 null 是否从配置文件确定编译设置。 默认值为 null

例外

未在 PreApplicationStart 方法中设置该属性。

注解

此属性使你可以以编程方式打开或关闭批处理编译。 它对应于 batch Web.config 文件中元素的属性 compilation 。 有关详细信息,请参阅 compilation 元素(ASP.NET 设置架构)

只能在方法中 PreApplicationStart 设置该属性。 有关该方法 PreApplicationStart 的详细信息,请参阅 PreApplicationStartMethodAttribute

适用于