/// <param name="type">The type of step.</param> /// <returns></returns> protected IStep getStep(StepsType type) { if (steps.ContainsKey(type)) { return(steps[type]); } switch (type) { case StepsType.Gen: { steps[type] = new StepGen(); return(steps[type]); } case StepsType.Struct: { steps[type] = new StepStruct(new MSBuild.Parser(env)) { fnumber = StepStruct.NumberType.NativeStruct }; return(steps[type]); } case StepsType.DirectRepl: { steps[type] = new StepRepl(); return(steps[type]); } case StepsType.CfgData: { steps[type] = new StepCfgData(); return(steps[type]); } case StepsType.Fields: { steps[type] = new StepFields(); return(steps[type]); } case StepsType.Final: { steps[type] = new StepFinal(this); return(steps[type]); } } throw new NotFoundException("getStep: the type - `{0}` is not found.", type); }
/// <param name="type">The type of step.</param> /// <returns></returns> protected IStep getStep(StepsType type) { if(steps.ContainsKey(type)) { return steps[type]; } switch(type) { case StepsType.Gen: { steps[type] = new StepGen(); return steps[type]; } case StepsType.Struct: { steps[type] = new StepStruct(new MSBuild.Parser(env)) { fnumber = StepStruct.NumberType.NativeStruct }; return steps[type]; } case StepsType.DirectRepl: { steps[type] = new StepRepl(); return steps[type]; } case StepsType.CfgData: { steps[type] = new StepCfgData(); return steps[type]; } case StepsType.Fields: { steps[type] = new StepFields(); return steps[type]; } case StepsType.Final: { steps[type] = new StepFinal(this); return steps[type]; } } throw new NotFoundException("getStep: the type - `{0}` is not found.", type); }
private void render(StepFinal s) { editorFinalScript._.Select(0, 0); try { editorFinalScript.Text = s.construct(); } catch(Exception ex) { Log.Error("Generation of user script '{0}' is failed: `{1}`", Text, ex.Message); } }