XmlSiteMapProvider.Dispose 方法

定義

告知 Web.sitemap 檔的檔案監視器,XmlSiteMapProvider 物件不再需要監視該檔案。Notifies the file monitor of the Web.sitemap file that the XmlSiteMapProvider object no longer requires the file to be monitored.

多載

Dispose()

告知 Web.sitemap 檔的檔案監視器,XmlSiteMapProvider 物件不再需要監視該檔案。Notifies the file monitor of the Web.sitemap file that the XmlSiteMapProvider object no longer requires the file to be monitored.

Dispose(Boolean)

告知 Web.sitemap 檔的檔案監視器,XmlSiteMapProvider 物件不再需要監視該檔案。Notifies the file monitor of the Web.sitemap file that the XmlSiteMapProvider object no longer requires the file to be monitored. Dispose(Boolean) 方法會使用布林參數,指出方法是否由使用者程式碼呼叫。The Dispose(Boolean) method takes a Boolean parameter indicating whether the method is called by user code.

Dispose()

告知 Web.sitemap 檔的檔案監視器,XmlSiteMapProvider 物件不再需要監視該檔案。Notifies the file monitor of the Web.sitemap file that the XmlSiteMapProvider object no longer requires the file to be monitored.

public:
 virtual void Dispose();
public void Dispose ();
abstract member Dispose : unit -> unit
override this.Dispose : unit -> unit
Public Sub Dispose ()

實作

備註

XmlSiteMapProvider類別 Dispose 會在從記憶體卸載網站地圖檔案時,執行介面的方法 IDisposable 以釋放其相關聯的檔案監視。The XmlSiteMapProvider class implements the Dispose method of the IDisposable interface to release its associated file monitor when the site map file is unloaded from memory. 方法的這個多載 Dispose 會呼叫採用參數的多載, Boolean 並將值設定為 trueThis overload of the Dispose method calls the overload that takes a Boolean parameter and sets the value to true.

適用於

Dispose(Boolean)

告知 Web.sitemap 檔的檔案監視器,XmlSiteMapProvider 物件不再需要監視該檔案。Notifies the file monitor of the Web.sitemap file that the XmlSiteMapProvider object no longer requires the file to be monitored. Dispose(Boolean) 方法會使用布林參數,指出方法是否由使用者程式碼呼叫。The Dispose(Boolean) method takes a Boolean parameter indicating whether the method is called by user code.

protected:
 virtual void Dispose(bool disposing);
protected virtual void Dispose (bool disposing);
abstract member Dispose : bool -> unit
override this.Dispose : bool -> unit
Protected Overridable Sub Dispose (disposing As Boolean)

參數

disposing
Boolean

true 表示釋放 Managed 和 Unmanaged 資源,false 則表示只釋放 Unmanaged 資源。true to release both managed and unmanaged resources; false to release only unmanaged resources.

備註

Dispose true 如果 Dispose 使用者程式碼呼叫方法,則方法會傳回。The Dispose method returns true if the Dispose method is called by user code. 否則 false ,如果在 Dispose 執行時間期間由完成項執行緒呼叫方法,則會傳回。Otherwise it returns false, if the Dispose method is called by the finalizer thread during run time.

另請參閱

適用於