TransactionAttribute.Value Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient la valeur TransactionOption pour la transaction, désactivant de manière optionnelle le service de transaction.
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
Valeur de propriété
Type de transaction spécifié, une valeur TransactionOption.
Exemples
L’exemple de code suivant obtient la valeur de la propriété d’un Transaction
Value attribut.
[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
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour