TransactionAttribute.Value Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene il valore TransactionOption per la transazione, disattivando eventualmente il servizio di transazione.
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
Valore della proprietà
Tipo di transazione specificato, un valore TransactionOption.
Esempio
L'esempio di codice seguente ottiene il valore della proprietà di Value un Transaction
attributo.
[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
Si applica a
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per