TransactionAttribute Konstruktoren
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Initialisiert eine neue Instanz der TransactionAttribute-Klasse.
Überlädt
| Name | Beschreibung |
|---|---|
| TransactionAttribute() |
Initialisiert eine neue Instanz der TransactionAttribute Klasse und legt den angeforderten Transaktionstyp der Komponente auf Required. |
| TransactionAttribute(TransactionOption) |
Initialisiert eine neue Instanz der TransactionAttribute Klasse, die den Transaktionstyp angibt. |
TransactionAttribute()
Initialisiert eine neue Instanz der TransactionAttribute Klasse und legt den angeforderten Transaktionstyp der Komponente auf Required.
public:
TransactionAttribute();
public TransactionAttribute();
Public Sub New ()
Beispiele
Im folgenden Codebeispiel wird ein neues TransactionAttribute.
[Transaction]
public class TransactionAttribute_Ctor : ServicedComponent
{
}
<Transaction()> _
Public Class TransactionAttribute_Ctor
Inherits ServicedComponent
End Class
Gilt für:
TransactionAttribute(TransactionOption)
Initialisiert eine neue Instanz der TransactionAttribute Klasse, die den Transaktionstyp angibt.
public:
TransactionAttribute(System::EnterpriseServices::TransactionOption val);
public TransactionAttribute(System.EnterpriseServices.TransactionOption val);
new System.EnterpriseServices.TransactionAttribute : System.EnterpriseServices.TransactionOption -> System.EnterpriseServices.TransactionAttribute
Public Sub New (val As TransactionOption)
Parameter
Der angegebene Transaktionstyp, ein TransactionOption Wert.
Beispiele
Im folgenden Codebeispiel wird ein neues TransactionAttribute.
[Transaction(TransactionOption.Supported)]
public class TransactionAttribute_Ctor_TransactionOption : ServicedComponent
{
}
[Transaction(TransactionOption.Supported,
Isolation=TransactionIsolationLevel.Serializable)]
public class TransactionAttribute_Ctor_TransactionOption_Isolation :
ServicedComponent
{
}
[Transaction(TransactionOption.Supported,
Isolation=TransactionIsolationLevel.Serializable,
Timeout=30)]
public class TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout :
ServicedComponent
{
}
<Transaction(TransactionOption.Supported)> _
Public Class TransactionAttribute_Ctor_TransactionOption
Inherits ServicedComponent
End Class
<Transaction(TransactionOption.Supported, Isolation := TransactionIsolationLevel.Serializable)> _
Public Class TransactionAttribute_Ctor_TransactionOption_Isolation
Inherits ServicedComponent
End Class
<Transaction(TransactionOption.Supported, Isolation := TransactionIsolationLevel.Serializable, Timeout := 30)> _
Public Class TransactionAttribute_Ctor_TransactionOption_Isolation_Timeout
Inherits ServicedComponent
End Class