Compartir a través de


SynchronizationAttribute.Value Propiedad

Definición

Obtiene el valor actual de la propiedad 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

Valor de propiedad

Uno de los valores de SynchronizationOption. De manera predeterminada, es Required.

Ejemplos

En el ejemplo de código siguiente se obtiene el valor de la propiedad de Value un Synchronization atributo.

[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

Se aplica a