public static ITaskRunnerBuilder UseDotNetRestore(this ITaskRunnerBuilder self, NuGetRestoreTaskOptions options)
 {
     self.UseDotNetCliCore();
     return(self.UseServices(
                ServiceDescriptor.Singleton(options),
                ServiceDescriptor.Singleton <ITaskProvider>(new DotNetRestoreTask())));
 }
 public static ITaskRunnerBuilder UseDefaultHelpers(this ITaskRunnerBuilder self)
 {
     return(self.UseServices(
                ServiceDescriptor.Singleton <ICommandExecutor, DefaultCommandExecutor>(),
                ServiceDescriptor.Singleton <FileSystemHelper, FileSystemHelper>(),
                ServiceDescriptor.Singleton <CommandHelper, CommandHelper>()));
 }
 private static void UseDotNetCliCore(this ITaskRunnerBuilder self)
 {
     if (!self.HasService <DotNetCliCoreTasks>())
     {
         self.UseServices(ServiceDescriptor.Singleton <ITaskProvider>(new DotNetCliCoreTasks()));
     }
 }
 public static ITaskRunnerBuilder UseServices(this ITaskRunnerBuilder self, params ServiceDescriptor[] descriptors)
 {
     return(self.UseServices(services =>
     {
         foreach (var descriptor in descriptors)
         {
             services.Add(descriptor);
         }
     }));
 }
示例#5
0
 public static ITaskRunnerBuilder UseAllTasksFromAssemblyContaining(this ITaskRunnerBuilder self, Type type)
 {
     return(self.UseServices(s =>
     {
         foreach (var exportedType in type.GetTypeInfo().Assembly.GetExportedTypes())
         {
             if (exportedType.GetTypeInfo().BaseType.Equals(typeof(TaskCollection)))
             {
                 s.AddSingleton(typeof(ITaskProvider), exportedType);
             }
         }
     }));
 }
 public static int Execute(this ITaskRunnerBuilder self, IEnumerable <string> args) => self.Build().Execute(args);
 public static ITaskRunnerBuilder UseStandardBuildSystem(this ITaskRunnerBuilder self)
 {
     return(self.UseServices(ServiceDescriptor.Singleton <ITaskProvider, BuildLifecycleTaskProvider>())
            .UseDefaultHelpers());
 }
 public static ITaskRunnerBuilder UseCleanDirectories(this ITaskRunnerBuilder self, params string[] directories)
 {
     return(self.UseServices(
                ServiceDescriptor.Singleton <ITaskProvider, CleanDirectoriesTask>(),
                ServiceDescriptor.Singleton(new CleanDirectoriesTaskOptions(directories))));
 }
示例#9
0
 public static ITaskRunnerBuilder UseTasksFrom(this ITaskRunnerBuilder self, Type type)
 {
     return(self.UseServices(s => s.AddSingleton(typeof(ITaskProvider), type)));
 }
 public static ITaskRunnerBuilder UseDotNetBuild(this ITaskRunnerBuilder self) => UseDotNetBuild(self, new DotNetBuildTaskOptions(new[] { "src/*/project.json" }));
示例#11
0
 public static ITaskRunnerBuilder UseTasksFrom <T>(this ITaskRunnerBuilder self) => UseTasksFrom(self, typeof(T));
 public static ITaskRunnerBuilder UseDotNetPack(this ITaskRunnerBuilder self) => UseDotNetPack(self, new NuGetPackTaskOptions("artifacts", new[] { "src/*/project.json" }));
 public static ITaskRunnerBuilder UseDotNetRestore(this ITaskRunnerBuilder self, params string[] directoriesToRestore) => UseDotNetRestore(self, new NuGetRestoreTaskOptions(directoriesToRestore));
 public static ITaskRunnerBuilder UseDotNetRestore(this ITaskRunnerBuilder self) => UseDotNetRestore(self, new NuGetRestoreTaskOptions(Enumerable.Empty <string>()));
 public static ITaskRunnerBuilder UseDotNetBuild(this ITaskRunnerBuilder self, params string[] projectGlobs) => UseDotNetBuild(self, new DotNetBuildTaskOptions(projectGlobs));
示例#16
0
 public static bool HasService <T>(this ITaskRunnerBuilder self) => self.HasService(typeof(T));
示例#17
0
 public static ITaskRunnerBuilder UseAllTasksFromAssemblyContaining <T>(this ITaskRunnerBuilder self) => UseAllTasksFromAssemblyContaining(self, typeof(T));
 public static ITaskRunnerBuilder UseDotNetPack(this ITaskRunnerBuilder self, string outputPath, params string[] projectGlobs) => UseDotNetPack(self, new NuGetPackTaskOptions(outputPath, projectGlobs));