Sdílet prostřednictvím


ProfileSettings Konstruktory

Definice

Inicializuje novou instanci ProfileSettings třídy .

Přetížení

ProfileSettings(String)

Inicializuje novou instanci ProfileSettings třídy . pomocí zadaného názvu pro novou instanci třídy .

ProfileSettings(String, Int32, Int32, TimeSpan)

Inicializuje novou instanci ProfileSettings třídy pomocí zadaných nastavení pro novou instanci třídy.

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

Inicializuje novou instanci BufferModeSettings třídy pomocí zadaných nastavení pro novou instanci třídy.

ProfileSettings(String)

Inicializuje novou instanci ProfileSettings třídy . pomocí zadaného názvu pro novou instanci třídy .

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)

Parametry

name
String

Název objektu, který ProfileSettings se má vytvořit.

Příklady

Následující příklad kódu ukazuje, jak použít ProfileSettings konstruktor. Tento příklad kódu je součástí většího příkladu HealthMonitoringSection pro třídu .

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

Poznámky

Následující tabulka obsahuje výchozí nastavení, která se používají pro tento konstruktor.

Vlastnost Výchozí hodnota
Custom Prázdný řetězec ("").
MaxLimit MaxValue.
MinInstances 1.
MinInterval Zero.

Viz také

Platí pro

ProfileSettings(String, Int32, Int32, TimeSpan)

Inicializuje novou instanci ProfileSettings třídy pomocí zadaných nastavení pro novou instanci třídy.

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)

Parametry

name
String

Název objektu, který ProfileSettings se má vytvořit.

minInstances
Int32

Minimální počet výskytů události před vyvolání události pro zprostředkovatele.

maxLimit
Int32

Maximální počet vyvolání událostí stejného typu.

minInterval
TimeSpan

A TimeSpan , který určuje minimální délku intervalu mezi časy, kdy jsou vyvolány dvě události stejného typu.

Příklady

Následující příklad kódu ukazuje, jak použít ProfileSettings konstruktor. Tento příklad kódu je součástí většího příkladu HealthMonitoringSection pro třídu .

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

Poznámky

Následující tabulka obsahuje výchozí nastavení, která se používají pro tento konstruktor.

Vlastnost Výchozí hodnota
Custom Prázdný řetězec ("").

Viz také

Platí pro

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

Inicializuje novou instanci BufferModeSettings třídy pomocí zadaných nastavení pro novou instanci třídy.

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)

Parametry

name
String

Název objektu, který ProfileSettings se má vytvořit.

minInstances
Int32

Minimální počet výskytů události před vyvolání události pro zprostředkovatele.

maxLimit
Int32

Maximální počet vyvolání událostí stejného typu.

minInterval
TimeSpan

Určuje TimeSpan minimální interval mezi dvěma událostmi stejného typu.

custom
String

Plně kvalifikovaný typ vlastní třídy, která implementuje IWebEventCustomEvaluator.

Příklady

Následující příklad kódu ukazuje, jak použít ProfileSettings konstruktor. Tento příklad kódu je součástí většího příkladu HealthMonitoringSection pro třídu .

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

Viz také

Platí pro