SynchronizationAttribute.Value 속성

정의

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

속성 값

SynchronizationOption 값 중 하나입니다. 기본값은 Required입니다.

예제

다음 코드 예제에서는 값을 가져옵니다를 Synchronization 특성의 Value 속성입니다.

[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

적용 대상