internal static NrdoTable getTableInternal(Assembly assembly, string name, Type type) { if (!TablesByAssembly.ContainsKey(assembly)) { if (NrdoReflection.GetNsBase(assembly) == null) { return(null); } TablesByAssembly[assembly] = new Dictionary <string, NrdoTable>(); } Dictionary <string, NrdoTable> tables = TablesByAssembly[assembly]; if (!tables.ContainsKey(name)) { if (type == null) { type = assembly.GetType(NrdoReflection.MangleName(assembly, name)); } tables[name] = (type == null ? null : new NrdoTable(type)); } return(tables[name]); }
internal static NrdoQuery getQueryInternal(Assembly assembly, string name, Type type) { if (!queriesByAssembly.ContainsKey(assembly)) { if (NrdoReflection.GetNsBase(assembly) == null) { return(null); } queriesByAssembly[assembly] = new Dictionary <string, NrdoQuery>(); } Dictionary <string, NrdoQuery> queries = queriesByAssembly[assembly]; if (!queries.ContainsKey(name)) { if (type == null) { type = assembly.GetType(NrdoReflection.MangleName(assembly, name)); } queries[name] = (type == null ? null : new NrdoQuery(type)); } return(queries[name]); }