protected void InitializeSDRTests(Action initStructs) { // Initialize the Semantic Type System. ssys = new STS(); // Initialize the Receptor System rsys = new ReceptorsContainer(ssys); // Initialize declaration and structure lists. decls = new List <SemanticTypeDecl>(); structs = new List <SemanticTypeStruct>(); // We must have a noun definition for now. Helpers.InitializeNoun(ssys, decls, structs); // We need this ST for query tests. SemanticTypeStruct sts = Helpers.CreateSemanticType("Query", false, decls, structs); Helpers.CreateNativeType(sts, "QueryText", "string", false); Helpers.CreateNativeType(sts, "Param0", "Object", false); // Initialize the Semantic Database Receptor sdr = new SemanticDatabase(rsys); sdr.DatabaseName = "test_semantic_database"; sdr.Connect(); // Create our semantic structure. initStructs(); // Instantiate the runtime code-behind. ssys.Parse(decls, structs); string code = ssys.GenerateCode(); System.Reflection.Assembly assy = Compiler.Compile(code); ssys.CompiledAssembly = assy; }