public bool UseNamespace(string ns, string declloc, IWarningLogger log) { if (bm == null) { // No bundle manager yet. Save the info; once our manager is // set, we can do all the loading and structure template instantiation. nsqueue[ns] = declloc; return(false); } // Standard initialization. UseRawNamespace("MBuildDynamic." + ns); // Now we load the associated structure template and instantiate // anything that needs instantiation. // XXX this was later before; why??? if (declloc == null) { throw ExHelp.App("! {0}, {1}", ns, declloc); } StructureTemplate st = bm.UseNamespaceTemplate(ns, declloc, log); if (st == null) { return(true); } known_structs[st.GetType()] = st; return(false); }
public void UseStructure(StructureTemplate st) { Type stype = st.GetType(); known_structs[stype] = st; UseRawNamespace(stype.Namespace); }