Dynamically generated object

xiaoxiao2021-03-05  48

Type = "assembly.classname, assembly.classname, assembly";

Type t = type.gettype (TYPE);

ItagParser Parser = (ItagParser) T.ssEMBLY.CREATEINSTANCE (T.Fullname);

Code pieces

Public ItagParser getParser (String XMLns, String Tag) {if (items == NULL) {items = new hashtable ();} if (! items.contains (xmlns "-" tag) {tagParserLib Plib = (tagparserlib) Config.parserslib [xmlns]; if (! plib.parsers.containskey (tag)) {Return Null;} tagparser pcfg = (tagparser) Plib.Parsers [tag]; string type = pcfg.Type; if (Type == NULL ) {string assembly = plib.assembly; string name = plib.defnamespace;! if (pcfg.classnamespace = null) name = pcfg.classnamespace;! if (pcfg.classname = null) name = pcfg.classname "."; Else Name = "" TAG; Type = Name "," asSembly;

Type t = type.gettype (Type); Itagparser Parser = (ItagParser) T.ssEMBLY.CreateInstance (T.Fullname); items.add (XMLns "-" Tag, Parser); Return Parser;} Return (Itagparser) Items [XMLNS "-" Tag];

转载请注明原文地址:https://www.9cbs.com/read-31876.html

New Post(0)