TraceSection.MostRecent 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,表示最近的請求是否總是儲存在伺服器上。
public:
property bool MostRecent { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("mostRecent", DefaultValue=false)]
public bool MostRecent { get; set; }
[<System.Configuration.ConfigurationProperty("mostRecent", DefaultValue=false)>]
member this.MostRecent : bool with get, set
Public Property MostRecent As Boolean
屬性值
true如果最新的請求總是儲存在追蹤日誌中;否則,。 false 預設值為 false。
- 屬性
範例
以下程式碼範例說明如何使用該 MostRecent 屬性。 此程式碼範例是本類別更大範例 TraceSection 的一部分。
// Get the current MostRecent property value.
Boolean mostRecentValue = traceSection.MostRecent;
// Set the MostRecent property to true.
traceSection.MostRecent = true;
' Get the current MostRecent property value.
Dim mostRecentValue As Boolean = traceSection.MostRecent
' Set the MostRecent property to true.
traceSection.MostRecent = True
備註
請求會依到達順序儲存在追蹤日誌中,並依屬性 RequestLimit 中指定的請求數為限。 當請求上限達到且 MostRecent 為 true時,舊請求會自動丟棄,新的請求會持續加入日誌。 當請求上限 MostRecent 且 為 false時,新的請求會被丟棄,直到先前的請求從日誌中移除或請求上限提高。