Прочитај на енглеском Уреди

Делите путем


TraceSection.MostRecent Property

Definition

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

C#
[System.Configuration.ConfigurationProperty("mostRecent", DefaultValue=false)]
public bool MostRecent { get; set; }

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.

C#

// Get the current MostRecent property value.
Boolean mostRecentValue = 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

Производ Верзије
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also