Aracılığıyla paylaş


WebApplicationLifetimeEvent Oluşturucular

Tanım

WebApplicationLifetimeEvent sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

WebApplicationLifetimeEvent(String, Object, Int32)

WebApplicationLifetimeEvent Sağlanan parametreleri kullanarak sınıfı başlatır.

WebApplicationLifetimeEvent(String, Object, Int32, Int32)

WebApplicationLifetimeEvent Sağlanan parametreleri kullanarak sınıfı başlatır.

WebApplicationLifetimeEvent(String, Object, Int32)

WebApplicationLifetimeEvent Sağlanan parametreleri kullanarak sınıfı başlatır.

protected public:
 WebApplicationLifetimeEvent(System::String ^ message, System::Object ^ eventSource, int eventCode);
protected internal WebApplicationLifetimeEvent (string message, object eventSource, int eventCode);
new System.Web.Management.WebApplicationLifetimeEvent : string * obj * int -> System.Web.Management.WebApplicationLifetimeEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer)

Parametreler

message
String

Olayla ilişkili ileti.

eventSource
Object

Olayın kaynağı olan nesne.

eventCode
Int32

Olayla ilişkili kod. Özel bir olay uyguladığınızda, olay kodu değerinden WebExtendedBasebüyük olmalıdır.

Örnekler

Aşağıdaki kod örneği, bir ASP.NET özel sistem durumu olayında öğesinin WebApplicationLifetimeEvent nasıl kullanılacağını gösterir. Bu kod örneği temel olarak kullanılacak doğru söz dizimini göstermek için tasarlanmıştır.

// Invoked in case of events identified only by 
// their event code.
public SampleWebApplicationLifetimeEvent(string msg, 
    object eventSource, int eventCode):
  base(msg, eventSource, eventCode)
{
    // Perform custom initialization.
    customCreatedMsg =
    string.Format("Event created at: {0}",
    DateTime.Now.TimeOfDay.ToString());
}
' Invoked in case of events identified only by 
' their event code.
Public Sub New(ByVal msg As String, _
ByVal eventSource As Object, _
ByVal eventCode As Integer)
    MyBase.New(msg, eventSource, eventCode)
    ' Perform custom initialization.
    customCreatedMsg = _
    String.Format("Event created at: {0}", _
    DateTime.Now.TimeOfDay.ToString())

End Sub

Açıklamalar

Bu oluşturucu, ASP.NET sistem durumu izleme sistemi tarafından dahili olarak kullanılır. Sınıfın WebApplicationLifetimeEvent bir örneğini oluşturmak için asla kullanmazsınız, ancak bu sınıftan devralan kendi olay türünüzü uygularken bu oluşturucuyu çağırabilirsiniz.

Not

Oluşturucunun WebApplicationLifetimeEvent doğrudan kodunuzdan kullanılması amaçlanmamıştır. ASP.NET tarafından çağrılır. sınıfından WebApplicationLifetimeEvent türetilirken oluşturucuyu WebApplicationLifetimeEvent çağırabilirsiniz.

Ayrıca bkz.

Şunlara uygulanır

WebApplicationLifetimeEvent(String, Object, Int32, Int32)

WebApplicationLifetimeEvent Sağlanan parametreleri kullanarak sınıfı başlatır.

protected public:
 WebApplicationLifetimeEvent(System::String ^ message, System::Object ^ eventSource, int eventCode, int eventDetailCode);
protected internal WebApplicationLifetimeEvent (string message, object eventSource, int eventCode, int eventDetailCode);
new System.Web.Management.WebApplicationLifetimeEvent : string * obj * int * int -> System.Web.Management.WebApplicationLifetimeEvent
Protected Friend Sub New (message As String, eventSource As Object, eventCode As Integer, eventDetailCode As Integer)

Parametreler

message
String

Olayla ilişkili ileti.

eventSource
Object

Olayın kaynağı olan nesne.

eventCode
Int32

Olayla ilişkili kod. Özel bir olay uyguladığınızda, olay kodu değerinden WebExtendedBasebüyük olmalıdır.

eventDetailCode
Int32

Olayın WebEventCodes ayrıntılı tanımlayıcısını belirten değer.

Örnekler

Aşağıdaki kod örneği, bir ASP.NET özel sistem durumu olayında öğesinin WebApplicationLifetimeEvent nasıl kullanılacağını gösterir. Bu kod örneği temel olarak kullanılacak doğru söz dizimini göstermek için tasarlanmıştır.

// Invoked in case of events identified by their 
// event code.and related event detailed code.
public SampleWebApplicationLifetimeEvent(string msg, 
    object eventSource, int eventCode, 
    int eventDetailCode):
  base(msg, eventSource, eventCode, eventDetailCode)
{
    // Perform custom initialization.
    customCreatedMsg =
     string.Format("Event created at: {0}",
     DateTime.Now.TimeOfDay.ToString());
}
' Invoked in case of events identified by their 
' event code.and related event detailed code.
Public Sub New(ByVal msg As String, _
ByVal eventSource As Object, _
ByVal eventCode As Integer, _
ByVal eventDetailCode As Integer)
    MyBase.New(msg, eventSource, _
    eventCode, eventDetailCode)
    ' Perform custom initialization.
    customCreatedMsg = _
    String.Format("Event created at: {0}", _
    DateTime.Now.TimeOfDay.ToString())
End Sub

Açıklamalar

Bu oluşturucu, ASP.NET sistem durumu izleme sistemi tarafından dahili olarak kullanılır. Sınıfın WebApplicationLifetimeEvent bir örneğini oluşturmak için asla kullanmazsınız, ancak bu sınıftan devralan kendi olay türünüzü uygularken bu oluşturucuyu çağırabilirsiniz.

Not

Oluşturucunun WebApplicationLifetimeEvent doğrudan kodunuzdan kullanılması amaçlanmamıştır. ASP.NET tarafından çağrılır. sınıfından WebApplicationLifetimeEvent türetilirken oluşturucuyu WebApplicationLifetimeEvent çağırabilirsiniz.

Ayrıca bkz.

Şunlara uygulanır