Ejemplo n.º 1
0
        public void BuildOut(RuntimicSystemModel semanticModel, SemanticAssemblyMask_I semanticAssembly)
        {
            if (semanticAssembly.IsBuiltOut)
            {
                return;
            }

            if (!semanticAssembly.IsBound())
            {
                throw new System.NotImplementedException("Semantic assemblies not handled");
            }

            BoundAssembly_I boundAssembly = (BoundAssembly_I)semanticAssembly;

            var list = Modules.Ensuring.EnsureAll(semanticModel, boundAssembly);

            for (int i = 0; i < list.Count; i++)
            {
                var moduleEntry = list[i];

                Modules.Building.BuildOut(semanticModel, moduleEntry);
            }

            boundAssembly.IsBuiltOut = true;
        }
Ejemplo n.º 2
0
        public SemanticModuleMask_I Ensure(RuntimicSystemModel semanticModel, BoundAssembly_I semanticAssembly, ModuleDefinition moduleDefinition)
        {
            // Ensure the module definition is in the assemlby definition that is past, and has not been loaded twice.
            if (moduleDefinition.Assembly != semanticAssembly.AssemblyDefinition)
            {
                throw new System.Exception("The modules assembly definition must be the same as the semantic assemlby's definition");
            }

            if (semanticAssembly.Modules.TryGetValue(moduleDefinition.Name, out SemanticModuleMask_I moduleEntry))
            {
                return(moduleEntry);
            }

            //moduleEntry = Modules.Creation.CreateModuleEntry(semanticAssembly, moduleDefinition);

            //Modules.Addition.AddModule(moduleEntry);

            //return moduleEntry;

            throw new System.Exception("Debug");
        }