Uredi

Deli z drugimi prek


ProfileSettings Constructors

Definition

Initializes a new instance of the ProfileSettings class.

Overloads

ProfileSettings(String)

Initializes a new instance of the ProfileSettings class. using the specified name for the new instance of the class.

ProfileSettings(String, Int32, Int32, TimeSpan)

Initializes a new instance of the ProfileSettings class, using specified settings for the new instance of the class.

ProfileSettings(String, Int32, Int32, TimeSpan, String)

Initializes a new instance of the BufferModeSettings class, using the specified settings for the new instance of the class.

ProfileSettings(String)

Initializes a new instance of the ProfileSettings class. using the specified name for the new instance of the class.

public:
 ProfileSettings(System::String ^ name);
public ProfileSettings (string name);
new System.Web.Configuration.ProfileSettings : string -> System.Web.Configuration.ProfileSettings
Public Sub New (name As String)

Parameters

name
String

The name of the ProfileSettings object to create.

Examples

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

// Add a ProfileSettings object to the Profiles collection property.
healthMonitoringSection.Profiles.Add(new ProfileSettings("Default"));
' Add a ProfileSettings object to the Profiles collection property.
healthMonitoringSection.Profiles.Add(new ProfileSettings("Default"))

Remarks

The following table shows the default settings that are used for this constructor.

Property Default value
Custom An empty string ("").
MaxLimit MaxValue.
MinInstances 1.
MinInterval Zero.

See also

Applies to

ProfileSettings(String, Int32, Int32, TimeSpan)

Initializes a new instance of the ProfileSettings class, using specified settings for the new instance of the class.

public:
 ProfileSettings(System::String ^ name, int minInstances, int maxLimit, TimeSpan minInterval);
public ProfileSettings (string name, int minInstances, int maxLimit, TimeSpan minInterval);
new System.Web.Configuration.ProfileSettings : string * int * int * TimeSpan -> System.Web.Configuration.ProfileSettings
Public Sub New (name As String, minInstances As Integer, maxLimit As Integer, minInterval As TimeSpan)

Parameters

name
String

The name of the ProfileSettings object to create.

minInstances
Int32

The minimum number of event occurrences before the event is raised to the provider.

maxLimit
Int32

The maximum number of times events of the same type are raised.

minInterval
TimeSpan

A TimeSpan that specifies the minimum length of the interval between the times when two events of the same type are raised.

Examples

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

// Add a ProfileSettings object to the Profiles collection property.
healthMonitoringSection.Profiles.Add(new ProfileSettings("Critical", 
    1, 1024, new TimeSpan(0, 0, 00)));
' Add a ProfileSettings object to the Profiles collection property.
healthMonitoringSection.Profiles.Add(new ProfileSettings("Critical",  _
    1, 1024, new TimeSpan(0, 0, 00)))

Remarks

The following table shows the default settings that are used for this constructor.

Property Default value
Custom An empty string ("").

See also

Applies to

ProfileSettings(String, Int32, Int32, TimeSpan, String)

Initializes a new instance of the BufferModeSettings class, using the specified settings for the new instance of the class.

public:
 ProfileSettings(System::String ^ name, int minInstances, int maxLimit, TimeSpan minInterval, System::String ^ custom);
public ProfileSettings (string name, int minInstances, int maxLimit, TimeSpan minInterval, string custom);
new System.Web.Configuration.ProfileSettings : string * int * int * TimeSpan * string -> System.Web.Configuration.ProfileSettings
Public Sub New (name As String, minInstances As Integer, maxLimit As Integer, minInterval As TimeSpan, custom As String)

Parameters

name
String

The name of the ProfileSettings object to create.

minInstances
Int32

The minimum number of event occurrences before the event is raised to the provider.

maxLimit
Int32

The maximum number of times events of the same type are raised.

minInterval
TimeSpan

A TimeSpan that specifies the minimum interval between two events of the same type.

custom
String

The fully qualified type of a custom class that implements IWebEventCustomEvaluator.

Examples

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

// Add a ProfileSettings object to the Profiles collection property.
healthMonitoringSection.Profiles.Add(new ProfileSettings("Targeted", 
    1, Int32.MaxValue, new TimeSpan(0, 0, 10), 
    "MyEvaluators.MyTargetedEvaluator, MyCustom.dll"));
' Add a ProfileSettings object to the Profiles collection property.
healthMonitoringSection.Profiles.Add(new ProfileSettings("Targeted", _
    1, Int32.MaxValue, new TimeSpan(0, 0, 10), _
    "MyEvaluators.MyTargetedEvaluator, MyCustom.dll"))

See also

Applies to