更新 : 2007 年 11 月
Web サイト プロジェクトにおける Web サービス参照の追加、削除、または変更によって発生するイベントへのアクセスを提供します。WebServicesEventsClass で提供される機能にアクセスするには、このクラスを使用します。
名前空間 : VsWebSite
アセンブリ : VsWebSite.Interop (VsWebSite.Interop.dll 内)
構文
'宣言
<GuidAttribute("E7E27BE0-FF6A-4D94-9B1B-D67F01D1E0FE")> _
Public Interface WebServicesEvents _
Implements _WebServicesEvents, _dispWebServicesEvents_Event
'使用
Dim instance As WebServicesEvents
[GuidAttribute("E7E27BE0-FF6A-4D94-9B1B-D67F01D1E0FE")]
public interface WebServicesEvents : _WebServicesEvents,
_dispWebServicesEvents_Event
[GuidAttribute(L"E7E27BE0-FF6A-4D94-9B1B-D67F01D1E0FE")]
public interface class WebServicesEvents : _WebServicesEvents,
_dispWebServicesEvents_Event
public interface WebServicesEvents extends _WebServicesEvents, _dispWebServicesEvents_Event
解説
WebServicesEventsClass オブジェクトに対するこのインターフェイスを取得するには、WebServicesEvents プロパティを使用します。
![]() |
---|
このクラスで提供される機能は、Visual Studio 2005 以降のバージョンの Visual Studio で使用できます。Visual Web Developer Express Edition では使用できません。 |
例
次に示すマクロ コードの例は、DTE2 (Development Tools Extensibility) オブジェクトを使用して現在の VSWebSite オブジェクトへの参照を作成する方法、および、イベントをサブスクライブする方法を示しています。このサンプルは、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