TransactionAttribute.Value Eigenschaft
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.
Ruft den TransactionOption-Wert für die Transaktion ab und deaktiviert dabei optional den Transaktionsdienst.
public:
property System::EnterpriseServices::TransactionOption Value { System::EnterpriseServices::TransactionOption get(); };
public System.EnterpriseServices.TransactionOption Value { get; }
member this.Value : System.EnterpriseServices.TransactionOption
Public ReadOnly Property Value As TransactionOption
Eigenschaftswert
Der angegebene Transaktionstyp, ein TransactionOption-Wert.
Beispiele
Im folgenden Codebeispiel wird der Wert der Eigenschaft eines Transaction
Attributs Value abgerufen.
[Transaction(TransactionOption.RequiresNew)]
public class TransactionAttribute_Value : ServicedComponent
{
public void ValueExample()
{
// Get the TransactionAttribute applied to the class.
TransactionAttribute attribute =
(TransactionAttribute)Attribute.GetCustomAttribute(
this.GetType(),
typeof(TransactionAttribute),
false);
// Display the value of the attribute's Value property.
Console.WriteLine("TransactionAttribute.Value: {0}",
attribute.Value);
}
}
<Transaction(TransactionOption.RequiresNew)> _
Public Class TransactionAttribute_Value
Inherits ServicedComponent
Public Sub ValueExample()
' Get the TransactionAttribute applied to the class.
Dim attribute As TransactionAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(TransactionAttribute), False), TransactionAttribute)
' Display the value of the attribute's Value property.
MsgBox("TransactionAttribute.Value: " & attribute.Value)
End Sub
End Class
Gilt für:
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für