示例#1
0
        private BuildServices setupServices()
        {
            var services = new BuildServices();
            var setter   = new ConventionsSetter();

            conventions(setter);
            setter.SetupServices(services);
            return(services);
        }
示例#2
0
        private async Task <BuildContext> buildAndGetAssembly(BuildServices services, BuildContext context)
        {
            try
            {
                context = services.ProjectFileChooser.FindProjectFile(context);
                context = services.ProjectBuilder.BuildProject(context);
                context = services.ProjectBinaryLoader.LoadAssemblyAndContext(context);
            }
            catch (Exception e)
            {
                context.Error = e;
            }

            return(context);
        }
示例#3
0
 internal void SetupServices(BuildServices services)
 {
     services.ProjectFileChooser  = projectFileChooser ?? new DirectoryProjectFileChooser();
     services.ProjectBuilder      = projectBuilder ?? new MsBuildProjectBuilder();
     services.ProjectBinaryLoader = projectBinaryLoader ?? new AssemblyBinaryLoader();
 }