AssemblyReferencesEvents 接口

表示 VSWebSite 对象的 References 属性的事件。 使用此类可访问 AssemblyReferencesEventsClass 提供的功能。

命名空间:  VsWebSite
程序集:  VsWebSite.Interop(在 VsWebSite.Interop.dll 中)

语法

声明
<GuidAttribute("E5E56972-0CFE-49B7-9EFB-923613FDA978")> _
Public Interface AssemblyReferencesEvents _
    Inherits _AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event
[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
[<GuidAttribute("E5E56972-0CFE-49B7-9EFB-923613FDA978")>]
type AssemblyReferencesEvents =  
    interface
        interface _AssemblyReferencesEvents
        interface _dispAssemblyReferencesEvents_Event
    end
public interface AssemblyReferencesEvents extends _AssemblyReferencesEvents, _dispAssemblyReferencesEvents_Event

AssemblyReferencesEvents 类型公开以下成员。

方法

  名称 说明
公共方法 add_AssemblyReferenceAdded 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 (继承自 _dispAssemblyReferencesEvents_Event。)
公共方法 add_AssemblyReferenceRemoved 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 (继承自 _dispAssemblyReferencesEvents_Event。)
公共方法 remove_AssemblyReferenceAdded 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 (继承自 _dispAssemblyReferencesEvents_Event。)
公共方法 remove_AssemblyReferenceRemoved 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 (继承自 _dispAssemblyReferencesEvents_Event。)

页首

事件

  名称 说明
公共事件 AssemblyReferenceAdded 基础结构。此事件支持 .NET Framework 基础结构,但不应在代码中直接使用。 (继承自 _dispAssemblyReferencesEvents_Event。)
公共事件 AssemblyReferenceRemoved 基础结构。此事件支持 .NET Framework 基础结构,但不应在代码中直接使用。 (继承自 _dispAssemblyReferencesEvents_Event。)

页首

备注

使用 AssemblyReferencesEvents 属性可获取 AssemblyReferencesEventsClass 对象的此接口。

提示

此类提供的功能在从 Visual Studio 2005 起的各个 Visual Studio 版本中均可用。 它在 Visual Web Developer 速成版中不可用。

示例

下面的宏代码示例演示如何通过设计时环境 (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

请参见

参考

VsWebSite 命名空间

DTE

VSWebSite

VSWebSiteEvents

VSWebSiteEvents

AssemblyReferencesEvents

AssemblyReferencesEventsClass

其他资源

引用自动化程序集和 DTE2 对象

如何:使用宏处理事件