MSBuildPackageBuilder CreateBuilder()
 {
     return Builder = new SpyMSBuildPackageBuilder(_fileSystem,
                                      new InMemoryEnvironment(rootPath, rootPath)
                                      {
                                          ExecutionEnvironment = new ExecutionEnvironment("AnyCPU", "net35")
                                      },
                                      new ResultParserStub(),
                                      _text,_returnCode);
 }
 IPackageBuilder ChooseBuilderInstance(string commandLine)
 {
     commandLine = commandLine.Trim();
     var isMsBuild = commandLine.StartsWithNoCase("msbuild");
     var isDefault = commandLine.StartsWithNoCase("default");
     var isxbuild = commandLine.StartsWithNoCase("xbuild");
     if (isMsBuild || isDefault || isxbuild)
     {
         var configValue = isDefault ? "default" : (isMsBuild ? "msbuild" : "xbuild");
         var builder = new MSBuildPackageBuilder(_fileSystem, _environment, new DefaultFileBuildResultParser())
         {
             Incremental = Incremental,
             BuildEngine = configValue
         };
         return builder;
     }
     if (commandLine.StartsWithNoCase("files"))
         return new FilePackageBuilder();
     if (commandLine.StartsWithNoCase("command") || commandLine.StartsWithNoCase("process"))
         return new CommandLinePackageBuilder(_fileSystem, _environment, new DefaultFileBuildResultParser());
     if (commandLine.StartsWithNoCase("custom"))
         return CreateCustomBuilder(commandLine);
     return new NullPackageBuilder(_environment);
 }
Beispiel #3
0
 IPackageBuilder ChooseBuilderInstance(string commandLine)
 {
     commandLine = commandLine.Trim();
     if (commandLine.StartsWithNoCase("msbuild"))
     {
         var builder = new MSBuildPackageBuilder(_fileSystem, _environment, new DefaultFileBuildResultParser())
         {
             Incremental = Incremental
         };
         return builder;
     }
     if (commandLine.StartsWithNoCase("files"))
         return new FilePackageBuilder();
     if (commandLine.StartsWithNoCase("command"))
         return new CommandLinePackageBuilder(_fileSystem, _environment, new DefaultFileBuildResultParser());
     if (commandLine.StartsWithNoCase("custom"))
         return CreateCustomBuilder(commandLine);
     return new NullPackageBuilder(_environment);
 }