CompilationSection.NumRecompilesBeforeAppRestart CompilationSection.NumRecompilesBeforeAppRestart CompilationSection.NumRecompilesBeforeAppRestart CompilationSection.NumRecompilesBeforeAppRestart Property

定義

取得或設定可在應用程式重新啟動之前發生的動態資源重新編譯次數。Gets or sets the number of dynamic recompiles of resources that can occur before the application restarts.

public:
 property int NumRecompilesBeforeAppRestart { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("numRecompilesBeforeAppRestart", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public int NumRecompilesBeforeAppRestart { get; set; }
member this.NumRecompilesBeforeAppRestart : int with get, set
Public Property NumRecompilesBeforeAppRestart As Integer

屬性值

值,表示可在應用程式重新啟動之前發生的動態資源重新編譯數目。A value indicating the number of dynamic recompiles of resources that can occur before the application restarts. 預設值為 15 次重新編譯。The default is 15 recompilations.

範例

下列程式碼範例示範如何使用NumRecompilesBeforeAppRestart屬性。The following code example demonstrates how to use the NumRecompilesBeforeAppRestart property. 此程式碼範例是針對提供之較大範例的一部分CompilationSection類別。This code example is part of a larger example provided for the CompilationSection class.

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

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

' Set NumRecompilesBeforeAppRestart property.
configSection.NumRecompilesBeforeAppRestart = 15

備註

指出資源,可能會發生在應用程式重新啟動之前動態重新編譯數目。Indicates the number of dynamic recompiles of resources that can occur before the application restarts. 在全域和應用程式的組態層級,但不是目錄層級的組態,將支援這個屬性。This attribute is supported at the global and application configuration levels, but not at the directory configuration level.

注意

ASP.NET 會增加NumRecompilesBeforeAppRestart每次組件就會失效,無法刪除的屬性值。ASP.NET increases the NumRecompilesBeforeAppRestart property value every time an assembly is invalidated and fails to be deleted.

適用於

另請參閱