public NamespaceBuilder (string sname, TypeResolveContext ctxt) { if (sname == null) throw new ArgumentNullException ("sname"); if (ctxt == null) throw new ArgumentNullException ("ctxt"); this.sname = sname; trc = ctxt; trc.SetNamespace (RealName); Type t = ctxt.Driver.LookupExistingFQN (StructureName); if (t != null) { paramstype = new UserType (t); nsparams = new ExistingNamespaceParams (t); } else { paramstype = new UserType (StructureName); // will be defined either by parameters {} or at end // of parsing the namespace. // FIXME: if we have two separate namespace {} sections, // I think they will both make their own StructureBuilder // instance, and those will clash. nsparams = null; } }
public NamespaceBuilder(string sname, TypeResolveContext ctxt) { if (sname == null) { throw new ArgumentNullException("sname"); } if (ctxt == null) { throw new ArgumentNullException("ctxt"); } this.sname = sname; trc = ctxt; trc.SetNamespace(RealName); Type t = ctxt.Driver.LookupExistingFQN(StructureName); if (t != null) { paramstype = new UserType(t); nsparams = new ExistingNamespaceParams(t); } else { paramstype = new UserType(StructureName); // will be defined either by parameters {} or at end // of parsing the namespace. // FIXME: if we have two separate namespace {} sections, // I think they will both make their own StructureBuilder // instance, and those will clash. nsparams = null; } }
public void SetUserParams (StructureBuilder sb) { if (nsparams != null) throw new Exception ("Trying to define a second set of parameters " + "for namespace " + sname); nsparams = sb; }
public void SetUserParams(StructureBuilder sb) { if (nsparams != null) { throw new Exception("Trying to define a second set of parameters " + "for namespace " + sname); } nsparams = sb; }