public AutoLoadFixtureFlavoursFromConfigAttribute(bool ignoreEnvironmentVariableOverrides = false) : base(typeof(FlavourConfigurationEnumerable))
 {
     if (ignoreEnvironmentVariableOverrides)
     {
         HostedEnvironment.SetFlavoursConfiguration(new FlavoursConfiguration(ignoreEnvironmentVariableOverrides: true));
     }
 }
Example #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            HostedEnvironment hostedEnvironment = db.Environments.Find(id);

            db.Environments.Remove(hostedEnvironment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #3
0
 public ActionResult Edit([Bind(Include = "ID,EnvironmentName")] HostedEnvironment hostedEnvironment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(hostedEnvironment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(hostedEnvironment));
 }
Example #4
0
        public ActionResult Create([Bind(Include = "ID,EnvironmentName")] HostedEnvironment hostedEnvironment)
        {
            if (ModelState.IsValid)
            {
                db.Environments.Add(hostedEnvironment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(hostedEnvironment));
        }
Example #5
0
        // GET: HostedEnvironments/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            HostedEnvironment hostedEnvironment = db.Environments.Find(id);

            if (hostedEnvironment == null)
            {
                return(HttpNotFound());
            }
            return(View(hostedEnvironment));
        }
Example #6
0
 protected override void SetUp()
 {
     HostedEnvironment.ResetFlavoursConfiguration();
     Environment.SetEnvironmentVariable("INEXREFHOSTING_HostingFlavours__Default", null);
     Environment.SetEnvironmentVariable("INEXREFHOSTING_HostingFlavours__AvailableFlavours", null);
 }