public void GenerateSummary(String outputLoc)
        {
            Console.WriteLine("Now let's generate summary..");
            HomeGenerator homePageGenerator = new HomeGenerator(this.AllTestSummary);

            homePageGenerator.Generate(outputLoc);
        }
예제 #2
0
        // This method is used to generate the description in the swagger UI page, according to the available features
        public string GetSwaggerHomepage(IFeatureManager featureManager)
        {
            var description = new StringBuilder();

            if (featureManager.IsEnabled(Features.Metrics))
            {
                description.Append(HomeGenerator.BasicHtml());
            }
            description.Append("<p>This template provides loads of developer friendly features that makes dotnet core ready for microservices and containers scenarios.</p>");
            description.Append("<ul>");
            if (featureManager.IsEnabled(Features.HttpLogger))
            {
                description.Append("<li><a target='_blank' href='/log?level=all'>/log</a> monitor your beautiful logs from the comfort of your browser </li>");
            }
            if (featureManager.IsEnabled(Features.Healthz))
            {
                description.Append("<li><a target='_blank' href='/healthz'>/healthz</a> url to monitor your application health status </li>");
            }
            if (featureManager.IsEnabled(Features.HealthUI))
            {
                description.Append("<li><a target='_blank' href='/healthchecks-ui'>/healthchecks-ui</a> UI to monitor your application health status </li>");
            }
            description.Append("</ul>");

            return(description.ToString());
        }
            public override void Apply(HomeGenerator.Pattern hp)
            {
                int modifiedNumber;
                string mod;

                if (GalaxyGeneratorPlugin.random.NextDouble() > this.probability) return;

                base.Apply(hp);

                mod = base.getRandomOverride();
                if (Int32.TryParse(mod, out modifiedNumber))
                {
                    hp.Star.GeneratePlanets(modifiedNumber);
                }
                else
                {
                    System.Diagnostics.Trace.WriteLine("Could not read Modified Planet Number from " + mod);
                }
            }
            public override void Apply(HomeGenerator.Pattern hp)
            {
                base.Apply(hp);

                string modifiedPlanetType = base.getRandomOverride();
                if (null == modifiedPlanetType) return;

                if (this.target == Component.AppliesTo.WORLD)
                {
                    if (GalaxyGeneratorPlugin.random.NextDouble() > this.probability) return;
                    hp.HomeWorld.ReCreateType(modifiedPlanetType);
                }
                else if (this.target == Component.AppliesTo.OTHER)
                {
                    foreach (Planet p in hp.OtherPlanets)
                    {
                        modifiedPlanetType = base.getRandomOverride();
                        if ((null != modifiedPlanetType) && (GalaxyGeneratorPlugin.random.NextDouble() <= this.probability))
                            p.ReCreateType(modifiedPlanetType);
                    }
                }
            }
            public override void Apply(HomeGenerator.Pattern hp)
            {
                base.Apply(hp);

                string modifiedStarType = base.getRandomOverride();

                if (null != modifiedStarType)
                {
                    if (hp.Star.type != modifiedStarType)
                    {
                        hp.Star.type = modifiedStarType;
                        //hp.Star.GeneratePlanets();
                    }
                }
            }
            public override void Apply(HomeGenerator.Pattern hp)
            {
                base.Apply(hp);

                if (this.allInhibited)
                {
                   this.inhibitList = Settings.Instance.strategicResourceNames.ToList();
                }

                foreach (Planet p in tgtPlanets)
                {
                    p.inhibitedStrategics = this.inhibitList;
                }
            }
            public override void Apply(HomeGenerator.Pattern hp)
            {
                base.Apply(hp);

                if ((this.inhibitList.Count == 0) && this.allInhibited)
                {
                    this.inhibitList.AddRange(Settings.Instance.anomalyNames);
                }

                foreach (Planet p in tgtPlanets)
                {
                    p.inhibitedAnomalies.AddRange(this.inhibitList);
                    p.ApplyInhibitAnomalies();
                }
            }
            public override void Apply(HomeGenerator.Pattern hp)
            {
                base.Apply(hp);

                if (this.target == AppliesTo.STAR)
                    tgtPlanets = hp.Star.Planets;
                else if (this.target == AppliesTo.WORLD)
                    tgtPlanets.Add(hp.HomeWorld);
                else if (this.target == AppliesTo.OTHER)
                    tgtPlanets = hp.OtherPlanets;
            }
 public virtual void Apply(HomeGenerator.Pattern hp)
 {
 }