コード例 #1
0
 private void AddAssemblyClasses(LoadedClasses classes, CompiledModel compiledModel)
 {
     InitializersData.Clear();
     foreach (KeyValuePair <ClassFile, FileContents> pair in classes.Files)
     {
         AddType(pair, compiledModel);
     }
 }
コード例 #2
0
        public void Update(LoadedClasses classes)
        {
            classes.SaveFilesContents(null);

            CompiledModel = ComileAssembly(classes);

            AddAssemblyClasses(classes, CompiledModel);
        }
コード例 #3
0
        private CompiledModel ComileAssembly(LoadedClasses classes)
        {
            TypeCompiler compiler = new TypeCompiler();

            compiler.AddGivenTypes(GetGivenTypesContents());
            return(compiler.Compile(
                       classes.Files.Values
                       .Select(file => file.Contents)));
        }
コード例 #4
0
        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;
        }
コード例 #5
0
 public ModelInitialization(LoadedClasses classes)
 {
     this.Solution = classes.Solution;
 }