예제 #1
0
        internal static SDProject ParseProject()
        {
            var testProjectPath =
                Path.Combine(
                Path.GetDirectoryName(Assembly.GetAssembly(typeof(Regression1)).Location),
                "..", "..", "..", "SharpDox.TestProject", "SharpDox.TestProject.csproj");
            
            var coreConfig = Mock.Of<ICoreConfigSection>(
                c => c.InputFile == testProjectPath &&
                c.ProjectName == "TestProject" &&
                c.DocLanguage == "en" &&
                c.ExcludedIdentifiers == new ObservableCollection<string>());
            
            var configController = Mock.Of<IConfigController>(
                c=> c.GetConfigSection<ICoreConfigSection>() == coreConfig);

            var stepInput = new StepInput(configController, new NRefactoryParser(Mock.Of<ParserStrings>()), new SDBuildStrings(), null);

            var config = new List<StepBase>();
            var checkConfig = new CheckConfigStep(stepInput, 0, 15);

            config.Add(new ParseProjectStep(stepInput, 0, 50));
            config.Add(new ParseCodeStep(stepInput, 50, 100));

            var sdProject = new SDProject();
            foreach (var step in config)
            {
                sdProject = step.RunStep(sdProject);
            }

            return sdProject;
        }
예제 #2
0
        public static List<StepBase> FullBuildConfig(IConfigController configController, ICodeParser codeParser, SDBuildStrings sdBuildStrings, IExporter[] allExporters)
        {
            var stepInput = new StepInput(configController, codeParser, sdBuildStrings, allExporters);

            var config = new List<StepBase>();
            var checkConfig = new CheckConfigStep(stepInput, 0, 15);

            config.Add(new ExtendedCheckConfigStep(stepInput, checkConfig, 0, 15));
            config.Add(new ParseProjectStep(stepInput, 15, 25));
            config.Add(new ParseCodeStep(stepInput, 25, 70));
            config.Add(new ExportStep(stepInput, 70, 100));

            return config;
        }
예제 #3
0
 public ExtendedCheckConfigStep(StepInput stepInput, CheckConfigStep checkConfigStep, int progressStart, int progressEnd)
     : base(stepInput, stepInput.SDBuildStrings.StepCheckConfig, new StepRange(progressStart, progressEnd))
 {
     _checkConfigStep = checkConfigStep;
 }
예제 #4
0
 public ExtendedCheckConfigStep(StepInput stepInput, CheckConfigStep checkConfigStep, int progressStart, int progressEnd) :
     base(stepInput, stepInput.SDBuildStrings.StepCheckConfig, new StepRange(progressStart, progressEnd))
 {
     _checkConfigStep = checkConfigStep;
 }