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