SynchronizationAttribute.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 le paramètre en cours de la propriété Value.
public:
property System::EnterpriseServices::SynchronizationOption Value { System::EnterpriseServices::SynchronizationOption get(); };
public System.EnterpriseServices.SynchronizationOption Value { get; }
member this.Value : System.EnterpriseServices.SynchronizationOption
Public ReadOnly Property Value As SynchronizationOption
Valeur de propriété
Une des valeurs de l'objet SynchronizationOption. La valeur par défaut est Required
.
Exemples
L’exemple de code suivant obtient la valeur de la propriété d’un Synchronization
Value attribut.
[Synchronization(SynchronizationOption.RequiresNew)]
public class SynchronizationAttribute_Value : ServicedComponent
{
public void ValueExample()
{
// Get the SynchronizationAttribute applied to the class.
SynchronizationAttribute attribute =
(SynchronizationAttribute)Attribute.GetCustomAttribute(
this.GetType(),
typeof(SynchronizationAttribute),
false);
// Display the value of the attribute's Value property.
Console.WriteLine("SynchronizationAttribute.Value: {0}",
attribute.Value);
}
}
<Synchronization(SynchronizationOption.RequiresNew)> _
Public Class SynchronizationAttribute_Value
Inherits ServicedComponent
Public Sub ValueExample()
' Get the SynchronizationAttribute applied to the class.
Dim attribute As SynchronizationAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(SynchronizationAttribute), False), SynchronizationAttribute)
' Display the value of the attribute's Value property.
MsgBox("SynchronizationAttribute.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