SynchronizationAttribute.Value Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current setting of the Value property.
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
Property Value
One of the SynchronizationOption values. The default is Required
.
Examples
The following code example gets the value of a Synchronization
attribute's Value property.
[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
Applies to
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про