Exemple #1
0
        public Form1()
        {
            InitializeComponent();

            RecipeStore = new FileSystemRecipeStore("./recipes");
            LoadRecipes();
        }
        public RecipeStepExecutor(
            IEnumerable <IRecipeHandler> recipeHandlers,
            IEventBus eventBus,
            IRecipeStore recipeStore,
            ILogger <RecipeStepExecutor> logger,
            IStringLocalizer <RecipeStepExecutor> localizer)
        {
            _recipeHandlers = recipeHandlers;
            _eventBus       = eventBus;
            _recipeStore    = recipeStore;
            _logger         = logger;

            T = localizer;
        }
        public StoreCallbackRecipeBuilder(IRecipeStore recipeStore)
        {
            Id           = new BuilderPropertyImpl <IRecipeBuilder, Guid>(this, Guid.NewGuid());
            Name         = new BuilderPropertyImpl <IRecipeBuilder, string>(this);
            Description  = new BuilderPropertyImpl <IRecipeBuilder, string>(this);
            RequiredTime = new BuilderPropertyImpl <IRecipeBuilder, TimeSpan>(this);

            ImageLoader = new BuilderPropertyImpl <IRecipeBuilder, string>(this);
            ImageSource = new BuilderPropertyImpl <IRecipeBuilder, string>(this);

            IngredientIds = new BuilderPropertyImpl <IRecipeBuilder, Guid[]>(this, new Guid[0]);
            PictogramIds  = new BuilderPropertyImpl <IRecipeBuilder, Guid[]>(this, new Guid[0]);
            StepIds       = new BuilderPropertyImpl <IRecipeBuilder, Guid[]>(this, new Guid[0]);

            _recipeStore = recipeStore;
        }
 public RecipeExecutor(
     IEnumerable <IRecipeEventHandler> recipeEventHandlers,
     IRecipeStore recipeStore,
     IApplicationLifetime applicationLifetime,
     ShellSettings shellSettings,
     IShellHost orchardHost,
     ILogger <RecipeExecutor> logger,
     IStringLocalizer <RecipeExecutor> localizer)
 {
     _orchardHost         = orchardHost;
     _shellSettings       = shellSettings;
     _applicationLifetime = applicationLifetime;
     _recipeEventHandlers = recipeEventHandlers;
     _recipeStore         = recipeStore;
     Logger = logger;
     T      = localizer;
 }
Exemple #5
0
 public RecipeExecutor(
     IEventBus eventBus,
     IRecipeStore recipeStore,
     IOptions <RecipeHarvestingOptions> recipeOptions,
     IApplicationLifetime applicationLifetime,
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     ILogger <RecipeExecutor> logger,
     IStringLocalizer <RecipeExecutor> localizer)
 {
     _orchardHost         = orchardHost;
     _shellSettings       = shellSettings;
     _applicationLifetime = applicationLifetime;
     _eventBus            = eventBus;
     _recipeStore         = recipeStore;
     _recipeOptions       = recipeOptions.Value;
     Logger = logger;
     T      = localizer;
 }
 public RecipesController(IRecipeStore recipeStore)
 {
     _recipeStore = recipeStore;
 }