TransactionAttribute Constructors
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Initialiseert een nieuw exemplaar van de TransactionAttribute klasse.
Overloads
| Name | Description |
|---|---|
| TransactionAttribute() |
Initialiseert een nieuw exemplaar van de TransactionAttribute klasse, waarbij het aangevraagde transactietype Requiredvan het onderdeel wordt ingesteld op . |
| TransactionAttribute(TransactionOption) |
Initialiseert een nieuw exemplaar van de TransactionAttribute klasse, waarbij het transactietype wordt opgegeven. |
TransactionAttribute()
Initialiseert een nieuw exemplaar van de TransactionAttribute klasse, waarbij het aangevraagde transactietype Requiredvan het onderdeel wordt ingesteld op .
public:
TransactionAttribute();
public TransactionAttribute();
Public Sub New ()
Voorbeelden
In het volgende codevoorbeeld wordt een nieuwe TransactionAttributegemaakt.
[Transaction]
public class TransactionAttribute_Ctor : ServicedComponent
{
}
<Transaction()> _
Public Class TransactionAttribute_Ctor
Inherits ServicedComponent
End Class
Van toepassing op
TransactionAttribute(TransactionOption)
Initialiseert een nieuw exemplaar van de TransactionAttribute klasse, waarbij het transactietype wordt opgegeven.
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)
Parameters
Het opgegeven transactietype, een TransactionOption waarde.
Voorbeelden
In het volgende codevoorbeeld wordt een nieuwe TransactionAttributegemaakt.
[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