ISiteFileWatcherService.RegisterForSiteNotifications 方法
適用於版本2
註冊網站的變更通知。
命名空間: Microsoft.WebMatrix.Extensibility
組件: Microsoft.WebMatrix.Extensibility (在 Microsoft.WebMatrix.Extensibility.dll 中)
語法
'宣告
Function RegisterForSiteNotifications ( _
changeTypes As WatcherChangeTypes, _
handler As FileSystemEventHandler, _
renameHandler As RenamedEventHandler _
) As Boolean
'用途
Dim instance As ISiteFileWatcherService
Dim changeTypes As WatcherChangeTypes
Dim handler As FileSystemEventHandler
Dim renameHandler As RenamedEventHandler
Dim returnValue As Boolean
returnValue = instance.RegisterForSiteNotifications(changeTypes, _
handler, renameHandler)
bool RegisterForSiteNotifications(
WatcherChangeTypes changeTypes,
FileSystemEventHandler handler,
RenamedEventHandler renameHandler
)
bool RegisterForSiteNotifications(
WatcherChangeTypes changeTypes,
FileSystemEventHandler^ handler,
RenamedEventHandler^ renameHandler
)
abstract RegisterForSiteNotifications :
changeTypes:WatcherChangeTypes *
handler:FileSystemEventHandler *
renameHandler:RenamedEventHandler -> bool
function RegisterForSiteNotifications(
changeTypes : WatcherChangeTypes,
handler : FileSystemEventHandler,
renameHandler : RenamedEventHandler
) : boolean
參數
changeTypes
型別:System.IO.WatcherChangeTypes您想要接收的通知類型。
handler
型別:System.IO.FileSystemEventHandler要與通知一起呼叫的處理常式。
renameHandler
型別:System.IO.RenamedEventHandler重新命名處理常式。
傳回值
型別:System.Boolean
如果可以提供通知,則為 true,否則為 false。