public Strategy(Starter st, Ender en, IsChilder isc, GetLeveler gl)
 {
     DoStart = st;
     DoEnd = en;
     DoIsChild = isc;
     DoGetLevel = gl;
 }
Exemplo n.º 2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            //WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            FluentMetadataConfiguration.Register();
            _starter = new Starter<IZingHost>(HostInitialization, HostBeginRequest, HostEndRequest);
            _starter.OnApplicationStart(this);
        }
        //__Create a default recipe box if there is no data
        public static RecipeBox generateDefault()
        {
            var newBox = new RecipeBox();
            for (int i = 0; i < 5; i++)
            {
                string message;
                var sourdough = new SourdoughRecipe();
                sourdough.Name = "Sourdough " + i;

                var breadFlour = new Ingredient("Bread Flour", IngredientType.Dry);
                breadFlour.Percent = 53.9;
                sourdough.Preferment.AddIngredient(breadFlour, out message);
                Starter starter = new Starter("Standard", 166);
                starter.Percent = 46.1;
                sourdough.Preferment.AddIngredient(starter);
                sourdough.Preferment.Percent = 37.1;

                var Dry = new IngredientGroup(IngredientType.Dry, "Dry", 30.2, sourdough);
                var flour = new Ingredient("Bread Flour", IngredientType.Dry, Dry);
                flour.Percent = 67;
                Dry.AddIngredient(flour);
                var wwFlour = new Ingredient("Whole Wheat", IngredientType.Dry, Dry);
                Dry.AddIngredient(wwFlour);
                wwFlour.Percent = 33;
                sourdough.AddGroup(Dry, out message);

                var wet = new IngredientGroup(IngredientType.Wet, "Water", 31.9, sourdough);
                var water = new Ingredient("Water", IngredientType.Wet, wet);
                water.Percent = 100;
                wet.AddIngredient(water);
                sourdough.AddGroup(wet, out message);

                var salt = new IngredientGroup(IngredientType.Salt, "Salt", 2, sourdough);
                var s = new Ingredient("Pink Himalayan", IngredientType.Salt, salt);
                s.Percent = 100;
                salt.AddIngredient(s);
                sourdough.AddGroup(salt, out message);

                sourdough.Description = "This is one wicked SD, chock full of love and ready to party!!!";
                sourdough.Weight = 1000;

                newBox.SourdoughRecipes.Add(sourdough);
            }

            return newBox;
        }
Exemplo n.º 4
0
 protected void Application_Start(object sender, EventArgs e)
 {
     RegisterRoutes(RouteTable.Routes);
     _starter = new Starter<IWebHost>(HostInitialization, HostBeginRequest, HostEndRequest);
     _starter.OnApplicationStart(this);
 }
Exemplo n.º 5
0
 protected void Application_Start() {
     RegisterRoutes(RouteTable.Routes);
     _starter = new Starter<IOrchardHost>(HostInitialization, HostBeginRequest, HostEndRequest);
     _starter.OnApplicationStart(this);
 }
Exemplo n.º 6
0
 static Work()
 {
     UI = new Starter(new StackTaskScheduler());
 }