ControlBuilder.CreateBuilderFromType(TemplateParser, ControlBuilder, Type, String, String, IDictionary, Int32, String) 方法

定義

根據指定的標記名稱和物件型別,以及其他定義產生器的參數,建立 ControlBuilder 物件。Creates a ControlBuilder object from the specified tag name and object type, as well as other parameters defining the builder.

public:
 static System::Web::UI::ControlBuilder ^ CreateBuilderFromType(System::Web::UI::TemplateParser ^ parser, System::Web::UI::ControlBuilder ^ parentBuilder, Type ^ type, System::String ^ tagName, System::String ^ id, System::Collections::IDictionary ^ attribs, int line, System::String ^ sourceFileName);
public static System.Web.UI.ControlBuilder CreateBuilderFromType (System.Web.UI.TemplateParser parser, System.Web.UI.ControlBuilder parentBuilder, Type type, string tagName, string id, System.Collections.IDictionary attribs, int line, string sourceFileName);
static member CreateBuilderFromType : System.Web.UI.TemplateParser * System.Web.UI.ControlBuilder * Type * string * string * System.Collections.IDictionary * int * string -> System.Web.UI.ControlBuilder

參數

parser
TemplateParser

負責剖析控制項的 TemplateParser 物件。The TemplateParser object responsible for parsing the control.

parentBuilder
ControlBuilder

負責建置父控制項的 ControlBuilder 物件。The ControlBuilder object responsible for building the parent control.

type
Type

產生器將建立之物件的 TypeThe Type of the object that the builder will create.

tagName
String

要建置的標記的名稱。The name of the tag to be built. 這讓產生器能夠支援多個標記類型。This allows the builder to support multiple tag types.

id
String

指派給控制項的 ID 屬性。The ID attribute assigned to the control.

attribs
IDictionary

包含所有指定標記屬性的 IDictionary 物件。The IDictionary object that holds all the specified tag attributes.

line
Int32

指定控制項的原始程式檔 (Source File) 行號。The source file line number for the specified control.

sourceFileName
String

原始程式檔的名稱,控制項要從該檔案中建立。The name of the source file from which the control is to be created.

傳回

負責建立控制項的產生器。The builder that is responsible for creating the control.

適用於