Condividi tramite


Classe WebServicesEventsClass

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

Gerarchia di ereditarietà

System.Object
  VsWebSite.WebServicesEventsClass

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

Sintassi

'Dichiarazione
<ClassInterfaceAttribute()> _
<GuidAttribute("F4DD7750-F662-4430-AB7C-74F9E8EA93BF")> _
Public Class WebServicesEventsClass _
    Implements _WebServicesEvents, WebServicesEvents, _dispWebServicesEvents_Event
[ClassInterfaceAttribute()]
[GuidAttribute("F4DD7750-F662-4430-AB7C-74F9E8EA93BF")]
public class WebServicesEventsClass : _WebServicesEvents, 
    WebServicesEvents, _dispWebServicesEvents_Event
[ClassInterfaceAttribute()]
[GuidAttribute(L"F4DD7750-F662-4430-AB7C-74F9E8EA93BF")]
public ref class WebServicesEventsClass : _WebServicesEvents, 
    WebServicesEvents, _dispWebServicesEvents_Event
[<ClassInterfaceAttribute()>]
[<GuidAttribute("F4DD7750-F662-4430-AB7C-74F9E8EA93BF")>]
type WebServicesEventsClass =  
    class
        interface _WebServicesEvents
        interface WebServicesEvents
        interface _dispWebServicesEvents_Event
    end
public class WebServicesEventsClass implements _WebServicesEvents, WebServicesEvents, _dispWebServicesEvents_Event

Il tipo WebServicesEventsClass espone i seguenti membri.

Costruttori

  Nome Descrizione
Metodo pubblico WebServicesEventsClass Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.Non creare un'istanza da questa classe.

In alto

Metodi

  Nome Descrizione
Metodo pubblico add_WebServiceAdded Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico add_WebServiceChanged Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico add_WebServiceRemoved Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico add_WebServiceRenamed 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_WebServiceAdded Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico remove_WebServiceChanged Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico remove_WebServiceRemoved Infrastruttura. Questo metodo supporta l'infrastruttura .NET Framework e non deve essere utilizzato direttamente dal codice.
Metodo pubblico remove_WebServiceRenamed 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 WebServiceAdded Si verifica quando alla proprietà WebServicesEvents di un oggetto VSWebSiteEvents viene aggiunto un servizio Web.
Evento pubblico WebServiceChanged Si verifica quando un elemento di un insieme di servizi Web di un progetto di sito Web viene modificato.
Evento pubblico WebServiceRemoved Si verifica quando un elemento di un insieme di servizi Web di un progetto di sito Web viene rimosso.
Evento pubblico WebServiceRenamed Si verifica quando un elemento di un insieme di servizi Web di un progetto di sito Web viene rinominato.

In alto

Note

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

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 DTE2 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 WebSvcsEvents As _
    VsWebSite.WebServicesEvents

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

WebServicesEvents

WebServicesEvents

Altre risorse

Riferimenti agli assembly di automazione e all'oggetto DTE2

Procedura: gestire gli eventi in una macro