表示 VSWebSite 对象的 References 属性的事件。 使用从 AssemblyReferencesEvents 属性获取的 AssemblyReferencesEvents 对象可访问此类的功能。 不要从此类实例化。
继承层次结构
System.Object
  VsWebSite.AssemblyReferencesEventsClass
命名空间:  VsWebSite
程序集:  VsWebSite.Interop(在 VsWebSite.Interop.dll 中)
语法
声明
<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
AssemblyReferencesEventsClass 类型公开以下成员。
构造函数
| 名称 | 说明 | |
|---|---|---|
| .gif) | AssemblyReferencesEventsClass | 基础结构。仅限内部使用。此类访问由 AssemblyReferencesEvents 提供的功能。不要从此类实例化。 | 
页首
方法
| 名称 | 说明 | |
|---|---|---|
| .gif) | add_AssemblyReferenceAdded | 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 | 
| .gif) | add_AssemblyReferenceRemoved | 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 | 
| .gif) | Equals | 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。) | 
| .gif) | Finalize | 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。) | 
| .gif) | GetHashCode | 用作特定类型的哈希函数。 (继承自 Object。) | 
| .gif) | GetType | 获取当前实例的 Type。 (继承自 Object。) | 
| .gif) | MemberwiseClone | 创建当前 Object 的浅表副本。 (继承自 Object。) | 
| .gif) | remove_AssemblyReferenceAdded | 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 | 
| .gif) | remove_AssemblyReferenceRemoved | 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。 | 
| .gif) | ToString | 返回表示当前对象的字符串。 (继承自 Object。) | 
页首
事件
| 名称 | 说明 | |
|---|---|---|
| .gif) | AssemblyReferenceAdded | 只要添加或更改网站中的程序集引用,就会发生。 | 
| .gif) | AssemblyReferenceRemoved | 只要移除或更改网站中的程序集引用,就会发生。 | 
页首
备注
此类通过 AssemblyReferencesEvents 接口访问,该接口是从 AssemblyReferencesEvents 属性获取的。
提示
此类提供的功能在从 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
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。