Επεξεργασία

Κοινή χρήση μέσω


TraceSection.MostRecent Property

Definition

Gets or sets a value indicating whether the most recent requests are always stored on the server.

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

Property Value

true if the most recent requests are always stored in the trace log; otherwise, false. The default is false.

Attributes

Examples

The following code example shows how to use the MostRecent property. This code example is part of a larger example provided for the TraceSection class.


// 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

Remarks

Requests are stored in the trace log in the order they arrive, up to the number of requests specified in the RequestLimit property. When the request limit is reached and MostRecent is true, older requests are automatically discarded and new requests continue to be added to the log. When the request limit is reached and MostRecent is false, new requests are discarded until earlier requests are removed from the log or the request limit is increased.

Applies to

See also