Container.CreateSite(IComponent, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
為該網站IComponent建立ISite一個網站,並將該名稱指派給該網站。
protected:
virtual System::ComponentModel::ISite ^ CreateSite(System::ComponentModel::IComponent ^ component, System::String ^ name);
protected virtual System.ComponentModel.ISite CreateSite(System.ComponentModel.IComponent component, string name);
abstract member CreateSite : System.ComponentModel.IComponent * string -> System.ComponentModel.ISite
override this.CreateSite : System.ComponentModel.IComponent * string -> System.ComponentModel.ISite
Protected Overridable Function CreateSite (component As IComponent, name As String) As ISite
參數
- component
- IComponent
為了 IComponent 建立一個網站。
- name
- String
指派給 component的名稱,或 null 跳過該命名指派。
傳回
新建立的網站。
備註
若 name 參數為 null,則 IComponent 加入 Container 但不標示名稱。
此方法可被派生類別覆蓋。 需要覆寫該方法的 CreateSite 實作者,可以透過實作 ISite 介面的類別提供自訂實作。