TransactionAttribute.Value Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the TransactionOption value for the transaction, optionally disabling the transaction service.
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
Property Value
The specified transaction type, a TransactionOption value.
Examples
The following code example gets the value of a Transaction
attribute's Value property.
[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
Applies to
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om