LoadBalancingSupportedAttribute.Value 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值,该值指示是否启用负载平衡支持。
public:
property bool Value { bool get(); };
public bool Value { get; }
member this.Value : bool
Public ReadOnly Property Value As Boolean
属性值
如果启用负载平衡支持,则为 true
;否则为 false
。 默认值为 true
。
示例
下面的代码示例获取特性的 LoadBalancingSupported
Value 属性的值。
[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