WebSiteMiscEventsClass 类

表示 VSWebSite 的杂项事件。 使用从 WebSiteMiscEvents 属性中获得的 WebSiteMiscEvents 对象访问此类的功能。 不要从此类实例化。

继承层次结构

System.Object
  VsWebSite.WebSiteMiscEventsClass

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

语法

声明
<ClassInterfaceAttribute()> _
<GuidAttribute("BC6984AB-D661-4B5E-A0CB-6DFD5FE2DDF4")> _
Public Class WebSiteMiscEventsClass _
    Implements _WebSiteMiscEvents, WebSiteMiscEvents, _dispWebSiteMiscEvents_Event
[ClassInterfaceAttribute()]
[GuidAttribute("BC6984AB-D661-4B5E-A0CB-6DFD5FE2DDF4")]
public class WebSiteMiscEventsClass : _WebSiteMiscEvents, 
    WebSiteMiscEvents, _dispWebSiteMiscEvents_Event
[ClassInterfaceAttribute()]
[GuidAttribute(L"BC6984AB-D661-4B5E-A0CB-6DFD5FE2DDF4")]
public ref class WebSiteMiscEventsClass : _WebSiteMiscEvents, 
    WebSiteMiscEvents, _dispWebSiteMiscEvents_Event
[<ClassInterfaceAttribute()>]
[<GuidAttribute("BC6984AB-D661-4B5E-A0CB-6DFD5FE2DDF4")>]
type WebSiteMiscEventsClass =  
    class
        interface _WebSiteMiscEvents
        interface WebSiteMiscEvents
        interface _dispWebSiteMiscEvents_Event
    end
public class WebSiteMiscEventsClass implements _WebSiteMiscEvents, WebSiteMiscEvents, _dispWebSiteMiscEvents_Event

WebSiteMiscEventsClass 类型公开以下成员。

构造函数

  名称 说明
公共方法 WebSiteMiscEventsClass 基础结构。仅限内部使用。此类访问由 WebSiteMiscEvents 提供的功能。不要从此类实例化。

页首

方法

  名称 说明
公共方法 add_OnAfterFolderRefresh 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。
公共方法 add_OnBeforeFolderRefresh 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。
公共方法 Equals 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 remove_OnAfterFolderRefresh 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。
公共方法 remove_OnBeforeFolderRefresh 基础结构。此方法支持 .NET Framework 基础结构,但不应在代码中直接使用。
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

事件

  名称 说明
公共事件 OnAfterFolderRefresh 在刷新网站中的某个文件夹后发生。
公共事件 OnBeforeFolderRefresh 在刷新网站中的某个文件夹之前发生。

页首

备注

通过 WebSiteMiscEvents 接口访问此类,此接口从 WebSiteMiscEvents 属性中获得。

提示

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

示例

下面的宏代码示例演示如何通过开发工具扩展 (DTE2) 对象创建对当前 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 MiscEvents As _
    VsWebSite.WebSiteMiscEvents

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

VsWebSite 命名空间

DTE

VSWebSite

VSWebSiteEvents

VSWebSiteEvents

WebSiteMiscEvents

WebSiteMiscEvents

其他资源

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

如何:使用宏处理事件