Compartir a través de


LoadBalancingSupportedAttribute.Value Propiedad

Definición

Obtiene un valor que indica si está habilitada la compatibilidad del equilibrio de carga.

public:
 property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean

Valor de propiedad

true si la capacidad de equilibrio de cargas está habilitada; en caso contrario, false. De manera predeterminada, es true.

Ejemplos

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

[LoadBalancingSupported(false)]
public class LoadBalancingSupportedAttribute_Value : ServicedComponent
{
    public void ValueExample()
    {
        // Get the LoadBalancingSupportedAttribute applied to the class.
        LoadBalancingSupportedAttribute attribute =
            (LoadBalancingSupportedAttribute)Attribute.GetCustomAttribute(
            this.GetType(),
            typeof(LoadBalancingSupportedAttribute),
            false);

        // Display the value of the attribute's Value property.
        Console.WriteLine("LoadBalancingSupportedAttribute.Value: {0}",
            attribute.Value);
    }
}
<LoadBalancingSupported(False)>  _
Public Class LoadBalancingSupportedAttribute_Value
    Inherits ServicedComponent
    
    Public Sub ValueExample() 
        ' Get the LoadBalancingSupportedAttribute applied to the class.
        Dim attribute As LoadBalancingSupportedAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(LoadBalancingSupportedAttribute), False), LoadBalancingSupportedAttribute)
        
        ' Display the value of the attribute's Value property.
        MsgBox("LoadBalancingSupportedAttribute.Value: " & attribute.Value)
    
    End Sub
End Class

Se aplica a