次の方法で共有


AssemblyReferencesEvents インターフェイス

更新 : 2007 年 11 月

VSWebSite オブジェクトの References プロパティのイベントを表します。AssemblyReferencesEventsClass で提供される機能にアクセスするには、このクラスを使用します。

名前空間 :  VsWebSite
アセンブリ :  VsWebSite.Interop (VsWebSite.Interop.dll 内)

構文

'宣言
<GuidAttribute("E5E56972-0CFE-49B7-9EFB-923613FDA978")> _
Public Interface AssemblyReferencesEvents _
    Implements _AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event
'使用
Dim instance As AssemblyReferencesEvents
[GuidAttribute("E5E56972-0CFE-49B7-9EFB-923613FDA978")]
public interface AssemblyReferencesEvents : _AssemblyReferencesEvents, 
    _dispAssemblyReferencesEvents_Event
[GuidAttribute(L"E5E56972-0CFE-49B7-9EFB-923613FDA978")]
public interface class AssemblyReferencesEvents : _AssemblyReferencesEvents, 
    _dispAssemblyReferencesEvents_Event
public interface AssemblyReferencesEvents extends _AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event

解説

AssemblyReferencesEventsClass オブジェクトに対するこのインターフェイスを取得するには、AssemblyReferencesEvents プロパティを使用します。

ms778647.alert_note(ja-jp,VS.90).gifメモ :

このクラスが備えている機能は、Visual Studio 2005 以降のバージョンの Visual Studio で使用できます。Visual Web Developer Express Edition では使用できません。

次に示すマクロ コードの例は、デザイン時環境 (DTE) を使用して現在の 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 AssemblyRefsEvents As _
    VsWebSite.AssemblyReferencesEvents

参照

参照

AssemblyReferencesEvents メンバ

VsWebSite 名前空間

DTE

VSWebSite

VSWebSiteEvents

VSWebSiteEvents

AssemblyReferencesEvents

AssemblyReferencesEventsClass

その他の技術情報

オートメーション アセンブリおよび DTE2 オブジェクトの参照

方法 : マクロでイベントを処理する