Ejemplo n.º 1
0
        /// <summary>
        /// Creates the name generator
        /// </summary>
        /// <param name="fallbackGenerator">Fallback name generator to be used when the set of projects is not a special case
        /// handled by this name generator.</param>
        /// <param name="analyzer">Solution analyzer to be used to find special cases.</param>
        public ReadableSlnNameGenerator(ISlnNameGenerator fallbackGenerator, ISuiteContentsAnalyzer analyzer)
        {
            Contract.Requires(fallbackGenerator != null);
            Contract.Requires(analyzer != null);

            this.fallbackGenerator = fallbackGenerator;
            this.analyzer = analyzer;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the name generator
        /// </summary>
        /// <param name="fallbackGenerator">Fallback name generator to be used when the set of projects is not a special case
        /// handled by this name generator.</param>
        /// <param name="analyzer">Solution analyzer to be used to find special cases.</param>
        public ReadableSlnNameGenerator(ISlnNameGenerator fallbackGenerator, ISuiteContentsAnalyzer analyzer)
        {
            Contract.Requires(fallbackGenerator != null);
            Contract.Requires(analyzer != null);

            this.fallbackGenerator = fallbackGenerator;
            this.analyzer          = analyzer;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructs the project builder factory
 /// </summary>
 /// <param name="slnBuilderFactory">Interface for creating new SLN builders</param>
 /// <param name="msBuildRunnerFactory">Interface to create new MSBuild runners</param>
 /// <param name="referenceBuilderFactory">Interface to create new reference builders</param>
 /// <param name="targetRoot">Target root directory</param>
 /// <param name="analyzer">Suite content analyzer implementation</param>
 /// <param name="suite">The active suite</param>
 /// <param name="postProcessorFactories">List of registered post processor factories</param>
 public VsProjectBuilderFactory(ISlnBuilderFactory slnBuilderFactory, IMSBuildRunnerFactory msBuildRunnerFactory, IReferenceBuilderFactory referenceBuilderFactory, 
     [TargetRoot] IFileSystemDirectory targetRoot, ISuiteContentsAnalyzer analyzer, Suite suite, IEnumerable<IPostProcessorFactory> postProcessorFactories)
 {
     this.slnBuilderFactory = slnBuilderFactory;
     this.msBuildRunnerFactory = msBuildRunnerFactory;
     this.referenceBuilderFactory = referenceBuilderFactory;
     this.targetRoot = targetRoot;
     this.analyzer = analyzer;
     this.suite = suite;
     this.postProcessorFactories = postProcessorFactories;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructs the project builder factory
 /// </summary>
 /// <param name="slnBuilderFactory">Interface for creating new SLN builders</param>
 /// <param name="msBuildRunnerFactory">Interface to create new MSBuild runners</param>
 /// <param name="referenceBuilderFactory">Interface to create new reference builders</param>
 /// <param name="targetRoot">Target root directory</param>
 /// <param name="analyzer">Suite content analyzer implementation</param>
 /// <param name="suite">The active suite</param>
 /// <param name="postProcessorFactories">List of registered post processor factories</param>
 public VsProjectBuilderFactory(ISlnBuilderFactory slnBuilderFactory, IMSBuildRunnerFactory msBuildRunnerFactory, IReferenceBuilderFactory referenceBuilderFactory,
                                [TargetRoot] IFileSystemDirectory targetRoot, ISuiteContentsAnalyzer analyzer, Suite suite, IEnumerable <IPostProcessorFactory> postProcessorFactories)
 {
     this.slnBuilderFactory       = slnBuilderFactory;
     this.msBuildRunnerFactory    = msBuildRunnerFactory;
     this.referenceBuilderFactory = referenceBuilderFactory;
     this.targetRoot             = targetRoot;
     this.analyzer               = analyzer;
     this.suite                  = suite;
     this.postProcessorFactories = postProcessorFactories;
 }
Ejemplo n.º 5
0
        public void SetUp()
        {
            fallback      = new Mock <ISlnNameGenerator>();
            suite         = new Suite(new TestFileSystemDirectory("root"));
            suiteContents = new DefaultSuiteContentsAnalyzer(suite);
            generator     = new ReadableSlnNameGenerator(fallback.Object, suiteContents);

            fallback.Setup(f => f.GetName(It.IsAny <IEnumerable <Project> >())).Returns("fallback");

            // mod1: proj11, testproj11
            // mod2: proj21, proj22
            // mod3: proj31
            // mod4: proj41
            // mod5: proj51
            // mod6: proj61
            // mod7: proj71

            // prod1: mod1, mod2
            // prod2: mod2, mod3

            mod1 = suite.GetModule("mod1");
            mod2 = suite.GetModule("mod2");
            mod3 = suite.GetModule("mod3");
            mod4 = suite.GetModule("mod4");
            mod5 = suite.GetModule("mod5");
            mod6 = suite.GetModule("mod6");
            mod7 = suite.GetModule("mod7");
            mod8 = suite.GetModule("mod8");

            proj11  = mod1.GetProject("proj1");
            tproj11 = mod1.GetTestProject("test1");
            proj21  = mod2.GetProject("proj21");
            proj22  = mod2.GetProject("proj22");
            proj31  = mod3.GetProject("proj3");
            proj41  = mod4.GetProject("proj4");
            proj51  = mod5.GetProject("proj5");
            proj61  = mod6.GetProject("proj6");
            proj71  = mod7.GetProject("proj7");
            proj81  = mod8.GetProject("proj8");
            tproj81 = mod8.GetTestProject("test8");

            prod1 = suite.GetProduct("prod1");
            prod1.AddModule(mod1);
            prod1.AddModule(mod2);

            prod2 = suite.GetProduct("prod2");
            prod2.AddModule(mod2);
            prod2.AddModule(mod3);
        }
Ejemplo n.º 6
0
        public void SetUp()
        {
            fallback = new Mock<ISlnNameGenerator>();                        
            suite = new Suite(new TestFileSystemDirectory("root"));
            suiteContents = new DefaultSuiteContentsAnalyzer(suite);
            generator = new ReadableSlnNameGenerator(fallback.Object, suiteContents);

            fallback.Setup(f => f.GetName(It.IsAny<IEnumerable<Project>>())).Returns("fallback");

            // mod1: proj11, testproj11
            // mod2: proj21, proj22
            // mod3: proj31        
            // mod4: proj41
            // mod5: proj51
            // mod6: proj61
            // mod7: proj71

            // prod1: mod1, mod2
            // prod2: mod2, mod3

            mod1 = suite.GetModule("mod1");
            mod2 = suite.GetModule("mod2");
            mod3 = suite.GetModule("mod3");
            mod4 = suite.GetModule("mod4");
            mod5 = suite.GetModule("mod5");
            mod6 = suite.GetModule("mod6");
            mod7 = suite.GetModule("mod7");
            mod8 = suite.GetModule("mod8");

            proj11 = mod1.GetProject("proj1");
            tproj11 = mod1.GetTestProject("test1");
            proj21 = mod2.GetProject("proj21");
            proj22 = mod2.GetProject("proj22");
            proj31 = mod3.GetProject("proj3");
            proj41 = mod4.GetProject("proj4");
            proj51 = mod5.GetProject("proj5");
            proj61 = mod6.GetProject("proj6");
            proj71 = mod7.GetProject("proj7");
            proj81 = mod8.GetProject("proj8");
            tproj81 = mod8.GetTestProject("test8");

            prod1 = suite.GetProduct("prod1");
            prod1.AddModule(mod1);
            prod1.AddModule(mod2);

            prod2 = suite.GetProduct("prod2");
            prod2.AddModule(mod2);
            prod2.AddModule(mod3);
        }