private void AddAssemblyClasses(LoadedClasses classes, CompiledModel compiledModel) { InitializersData.Clear(); foreach (KeyValuePair <ClassFile, FileContents> pair in classes.Files) { AddType(pair, compiledModel); } }
public void Update(LoadedClasses classes) { classes.SaveFilesContents(null); CompiledModel = ComileAssembly(classes); AddAssemblyClasses(classes, CompiledModel); }
private CompiledModel ComileAssembly(LoadedClasses classes) { TypeCompiler compiler = new TypeCompiler(); compiler.AddGivenTypes(GetGivenTypesContents()); return(compiler.Compile( classes.Files.Values .Select(file => file.Contents))); }
private void InitContexts(Solution solution) { LoadedClasses = new LoadedClasses(solution, messageService, dialogFactory); ModelInitialization = new ModelInitialization(LoadedClasses); ModelRunner = new ModelRunner(); ModelRunner.UserCodeException += UserCodeException; panelDataContexts[TaskSummaryStep] = solution.Task; panelDataContexts[EditCodeStep] = LoadedClasses; panelDataContexts[ModelInitializationStep] = ModelInitialization; panelDataContexts[ModelRunningStep] = ModelRunner; }
public ModelInitialization(LoadedClasses classes) { this.Solution = classes.Solution; }