Condividi tramite


Classe AssemblyReferencesEventsClass

Rappresenta gli eventi per la proprietà References di un oggetto VSWebSite. Utilizzare l'oggetto AssemblyReferencesEvents ottenuto dalla proprietà AssemblyReferencesEvents per accedere alle funzionalità di questa classe. Non creare un'istanza da questa classe.

Gerarchia di ereditarietà

System.Object
  VsWebSite.AssemblyReferencesEventsClass

Spazio dei nomi:  VsWebSite
Assembly:  VsWebSite.Interop (in VsWebSite.Interop.dll)

Sintassi

'Dichiarazione
<GuidAttribute("F11526E7-4102-4070-9B60-BD4F5CD3006B")> _
<ClassInterfaceAttribute()> _
Public Class AssemblyReferencesEventsClass _
    Implements _AssemblyReferencesEvents, AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event
[GuidAttribute("F11526E7-4102-4070-9B60-BD4F5CD3006B")]
[ClassInterfaceAttribute()]
public class AssemblyReferencesEventsClass : _AssemblyReferencesEvents, 
    AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event
[GuidAttribute(L"F11526E7-4102-4070-9B60-BD4F5CD3006B")]
[ClassInterfaceAttribute()]
public ref class AssemblyReferencesEventsClass : _AssemblyReferencesEvents, 
    AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event
[<GuidAttribute("F11526E7-4102-4070-9B60-BD4F5CD3006B")>]
[<ClassInterfaceAttribute()>]
type AssemblyReferencesEventsClass =  
    class
        interface _AssemblyReferencesEvents
        interface AssemblyReferencesEvents
        interface _dispAssemblyReferencesEvents_Event
    end
public class AssemblyReferencesEventsClass implements _AssemblyReferencesEvents, AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event

Il tipo AssemblyReferencesEventsClass espone i seguenti membri.

Costruttori

  Nome Descrizione
Metodo pubblico AssemblyReferencesEventsClass Infrastruttura. Solo per utilizzo interno.Questa classe accede alle funzionalità fornite dall'oggetto AssemblyReferencesEvents.Non creare un'istanza da questa classe.

In alto

Metodi

  Nome Descrizione
Metodo pubblico add_AssemblyReferenceAdded Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico add_AssemblyReferenceRemoved Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico Equals Determina se l'oggetto Object specificato è uguale all'oggetto Object corrente. (Ereditato da Object)
Metodo protetto Finalize Consente a un oggetto di provare a liberare risorse ed eseguire altre operazioni di pulitura prima che l'oggetto stesso venga recuperato dalla procedura di Garbage Collection. (Ereditato da Object)
Metodo pubblico GetHashCode Funge da funzione hash per un determinato tipo. (Ereditato da Object)
Metodo pubblico GetType Ottiene l'oggetto Type dell'istanza corrente. (Ereditato da Object)
Metodo protetto MemberwiseClone Consente di creare una copia dei riferimenti dell'oggetto Object corrente. (Ereditato da Object)
Metodo pubblico remove_AssemblyReferenceAdded Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico remove_AssemblyReferenceRemoved Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico ToString Restituisce una stringa che rappresenta l'oggetto corrente. (Ereditato da Object)

In alto

Eventi

  Nome Descrizione
Evento pubblico AssemblyReferenceAdded Si verifica quando viene aggiunto o modificato un riferimento a un assembly in un sito Web.
Evento pubblico AssemblyReferenceRemoved Si verifica quando viene rimosso o modificato un riferimento a un assembly in un sito Web.

In alto

Note

A questa classe si accede tramite l'interfaccia AssemblyReferencesEvents ottenuta dalla proprietà AssemblyReferencesEvents.

Nota

Le funzionalità fornite da questa classe sono disponibili a partire da Visual Studio 2005. Non è disponibile in Visual Web Developer Express Edition.

Esempi

Nell'esempio di codice di macro seguente viene illustrato come creare un riferimento all'oggetto VSWebSite corrente tramite l'oggetto DTE e come sottoscrivere un evento. Questo esempio fa parte di un esempio più esaustivo fornito per l'interfaccia VSWebSiteEvents.

' Initialize the VsWebSite and the Events
Sub InitAssemblyRefsEvents()
    ' Get a reference to the first Web site 
    ' in the current solution
    Dim ws As VsWebSite.VSWebSite = _
        DTE.Solution.Projects.Item(1).Object

    ' Attach the Web site events to module events
    AssemblyRefsEvents = _
        ws.VSWebSiteEvents.AssemblyReferencesEvents
End Sub
' Declare the event
' The macro IDE requires the attribute 
' in order to trap the events
<System.ContextStaticAttribute()> _
Public WithEvents AssemblyRefsEvents As _
    VsWebSite.AssemblyReferencesEvents

Codice thread safe

Qualsiasi membro static (Shared in Visual Basic) pubblico di questo tipo è thread-safe. I membri di istanza non sono garantiti come thread-safe.

Vedere anche

Riferimenti

Spazio dei nomi VsWebSite

DTE

VSWebSite

VSWebSiteEvents

VSWebSiteEvents

AssemblyReferencesEvents

AssemblyReferencesEvents

Altre risorse

Riferimenti agli assembly di automazione e all'oggetto DTE2

Procedura: gestire gli eventi in una macro