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
時,會捨棄新的要求,直到先前的要求從記錄中移除或要求限制增加為止。