예제 #1
0
        public virtual LoggingConfiguration Build(ILoggingOptions settings)
        {
            BeforeBuildAction?.Invoke(this, settings);
            var loggingConfiguration = new LoggingConfiguration(settings, ConfigurationBuilder.Build());

            AfterBuildAction?.Invoke(loggingConfiguration);
            return(loggingConfiguration);
        }
예제 #2
0
        public override LoggingConfiguration Build(ILoggingOptions settings)
        {
            BeforeBuildAction?.Invoke(this, settings);
            var loggingConfiguration = new LoggingConfiguration(settings, _root);

            AfterBuildAction?.Invoke(loggingConfiguration);
            return(loggingConfiguration);
        }
예제 #3
0
		public void RunASPTest (string templateName, BeforeBuildAction beforeBuild)
		{
			var templateOptions = new TemplateSelectionOptions {
				CategoryRoot = OtherCategoryRoot,
				Category = aspCategory,
				TemplateKindRoot = GeneralKindRoot,
				TemplateKind = templateName
			};
			CreateBuildProject (templateOptions, beforeBuild.GetAction ());
		}
        public void RunDotNetTests(string templateName, BeforeBuildAction beforeBuild)
        {
            var templateOptions = new TemplateSelectionOptions {
                CategoryRoot     = OtherCategoryRoot,
                Category         = dotNetCategory,
                TemplateKindRoot = GeneralKindRoot,
                TemplateKind     = templateName
            };

            CreateBuildProject(templateOptions, beforeBuild.GetAction());
        }
예제 #5
0
        public static Action GetAction(this BeforeBuildAction action)
        {
            switch (action)
            {
            case BeforeBuildAction.None:
                return(Ide.EmptyAction);

            case BeforeBuildAction.WaitForPackageUpdate:
                return(Ide.WaitForPackageUpdate);

            case BeforeBuildAction.WaitForSolutionCheckedOut:
                return(Ide.WaitForSolutionCheckedOut);

            default:
                return(Ide.EmptyAction);
            }
        }
예제 #6
0
        public IServiceProvider Build()
        {
            if (_hasBuild)
            {
                throw new InvalidOperationException("Only can be built once.");
            }

            BeforeBuildAction?.Invoke(_services);

            var resolver = _services.ToServiceContainer().Build();

            AfterBuildAction?.Invoke(resolver);

            _hasBuild = true;

            return(resolver);
        }