Upraviť

Zdieľať cez


ProfileSettings.MinInstances Property

Definition

Gets or sets the minimum number of event occurrences before the event is raised to the provider.

public:
 property int MinInstances { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("minInstances", DefaultValue=1)]
[System.Configuration.IntegerValidator(MinValue=1)]
public int MinInstances { get; set; }
[<System.Configuration.ConfigurationProperty("minInstances", DefaultValue=1)>]
[<System.Configuration.IntegerValidator(MinValue=1)>]
member this.MinInstances : int with get, set
Public Property MinInstances As Integer

Property Value

The minimum number of event occurrences before the event is fired to the provider. The default is 1.

Attributes

Examples

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

profileSetting.MinInstances = 1;
profileSetting.MinInstances = 1

Remarks

This property must have a value greater than zero. The value can be made infinite by setting it to MaxValue. Invalid values may cause an exception to be thrown when the configuration section is saved.

This property specifies the minimum number of times an event occurs before an event is raised to the provider. For example, a value of 5 means that ASP.NET will not raise an event to the provider until the fifth instance of the event occurs. If the value is infinite (MaxValue), then no event will be raised to the provider.

Applies to

See also