LoadBalancingSupportedAttribute Klass

Definition

Avgör om komponenten deltar i belastningsutjämning, om komponentens belastningsutjämningstjänst är installerad och aktiverad på servern.

public ref class LoadBalancingSupportedAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)]
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class LoadBalancingSupportedAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)>]
[<System.Runtime.InteropServices.ComVisible(false)>]
type LoadBalancingSupportedAttribute = class
    inherit Attribute
Public NotInheritable Class LoadBalancingSupportedAttribute
Inherits Attribute
Arv
LoadBalancingSupportedAttribute
Attribut

Exempel

I följande kodexempel visas användningen av LoadBalancingSupportedAttribute typen.

using System;
using System.EnterpriseServices;
using System.Reflection;

// References:
// System.EnterpriseServices

[LoadBalancingSupported]
public class LoadBalancingSupportedAttribute_Ctor : ServicedComponent
{
}

[LoadBalancingSupported(false)]
public class LoadBalancingSupportedAttribute_Ctor_Bool : ServicedComponent
{
}

[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);
    }
}
Imports System.EnterpriseServices
Imports System.Reflection


' References:
' System.EnterpriseServices

<LoadBalancingSupported()>  _
Public Class LoadBalancingSupportedAttribute_Ctor
    Inherits ServicedComponent
End Class

<LoadBalancingSupported(False)>  _
Public Class LoadBalancingSupportedAttribute_Ctor_Bool
    Inherits ServicedComponent
End Class

<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

Konstruktorer

Name Description
LoadBalancingSupportedAttribute()

Initierar en ny instans av LoadBalancingSupportedAttribute klassen och anger stöd för belastningsutjämning.

LoadBalancingSupportedAttribute(Boolean)

Initierar en ny instans av LoadBalancingSupportedAttribute klassen och inaktiverar eventuellt stöd för belastningsutjämning.

Egenskaper

Name Description
TypeId

När den implementeras i en härledd klass hämtar du en unik identifierare för den här Attribute.

(Ärvd från Attribute)
Value

Hämtar ett värde som anger om stöd för belastningsutjämning är aktiverat.

Metoder

Name Description
Equals(Object)

Returnerar ett värde som anger om den här instansen är lika med ett angivet objekt.

(Ärvd från Attribute)
GetHashCode()

Returnerar hash-koden för den här instansen.

(Ärvd från Attribute)
GetType()

Hämtar den aktuella instansen Type .

(Ärvd från Object)
IsDefaultAttribute()

När den åsidosättas i en härledd klass anger du om värdet för den här instansen är standardvärdet för den härledda klassen.

(Ärvd från Attribute)
Match(Object)

När den åsidosätts i en härledd klass returneras ett värde som anger om den här instansen är lika med ett angivet objekt.

(Ärvd från Attribute)
MemberwiseClone()

Skapar en ytlig kopia av den aktuella Object.

(Ärvd från Object)
ToString()

Returnerar en sträng som representerar det aktuella objektet.

(Ärvd från Object)

Explicita gränssnittsimplementeringar

Name Description
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Mappar en uppsättning namn till en motsvarande uppsättning av sändningsidentifierare.

(Ärvd från Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Hämtar typinformationen för ett objekt, som kan användas för att hämta typinformationen för ett gränssnitt.

(Ärvd från Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Hämtar antalet typinformationsgränssnitt som ett objekt tillhandahåller (antingen 0 eller 1).

(Ärvd från Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Ger åtkomst till egenskaper och metoder som exponeras av ett objekt.

(Ärvd från Attribute)

Gäller för