public RecipeActionsController(IRecipeManager recipeManager, UserManager <User> userManager,
                                IEnumerable <IActionDescriptor> actionDescriptors)
 {
     _recipeManager     = recipeManager;
     _userManager       = userManager;
     _actionDescriptors = actionDescriptors;
 }
示例#2
0
        public AdminController(
            IEnumerable<IExtensionDisplayEventHandler> extensionDisplayEventHandlers,
            IOrchardServices services,
            IModuleService moduleService,
            IDataMigrationManager dataMigrationManager,
            IReportsCoordinator reportsCoordinator,
            IExtensionManager extensionManager,
            IFeatureManager featureManager,
            IRecipeHarvester recipeHarvester,
            IRecipeManager recipeManager,
            ShellDescriptor shellDescriptor,
            ShellSettings shellSettings,
            IShapeFactory shapeFactory)
        {
            Services = services;
            _extensionDisplayEventHandler = extensionDisplayEventHandlers.FirstOrDefault();
            _moduleService = moduleService;
            _dataMigrationManager = dataMigrationManager;
            _reportsCoordinator = reportsCoordinator;
            _extensionManager = extensionManager;
            _featureManager = featureManager;
            _recipeHarvester = recipeHarvester;
            _recipeManager = recipeManager;
            _shellDescriptor = shellDescriptor;
            _shellSettings = shellSettings;
            Shape = shapeFactory;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
示例#3
0
 public CheckExchangeBalanceController(IRecipeManager recipeManager, UserManager <User> userManager,
                                       IMemoryCache memoryCache,
                                       IExternalServiceManager externalServiceManager) : base(recipeManager, userManager,
                                                                                              memoryCache, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
示例#4
0
        public static PagedList <RecipeSearchModel> SearchRecipes(this IRecipeManager recipeManager,
                                                                  int page, int pageSize, RecipeSortType sortType, ViewModels.Filter filter)
        {
            if (pageSize < 1)
            {
                pageSize = 1;
            }

            ICollection <RecipeSearchModel> data =
                Mapper.Map <IEnumerable <Entities.Recipe>, IEnumerable <RecipeSearchModel> >(
                    recipeManager.FindByName(filter.SearchKeyword ?? string.Empty)).ToList();

            var orderedData = RecipeHelper.SortRecipes(recipeManager.FilterProducts(data, filter), sortType);

            int pages = (data.Count + pageSize - 1) / pageSize;

            if (page > pages)
            {
                page = pages;
            }
            if (page < 1)
            {
                page = 1;
            }

            return(new PagedList <RecipeSearchModel>(orderedData, page, pageSize));
        }
示例#5
0
 public ReceiveWebRequestController(IRecipeManager recipeManager, UserManager <User> userManager,
                                    IMemoryCache memoryCache, ITriggerDispatcher triggerDispatcher,
                                    IExternalServiceManager externalServiceManager) : base(recipeManager, userManager, memoryCache,
                                                                                           externalServiceManager)
 {
     _triggerDispatcher = triggerDispatcher;
 }
示例#6
0
 public ShowRecipeByName(IRecipeManager recipeManager, IInputProvider inputProvider, IModelDrawer <Recipe> recipeDrawer) :
     base(title: "Show recipe by name")
 {
     this.inputProvider = inputProvider;
     this.recipeDrawer  = recipeDrawer;
     this.recipeManager = recipeManager;
 }
示例#7
0
 public CatalogViewModel(
     ICategoryManager categoryManager,
     IRecipeManager recipeManager)
 {
     _categoryManager = categoryManager;
     _recipeManager   = recipeManager;
 }
 public GetExchangeRateController(IMemoryCache memoryCache,
                                  UserManager <User> userManager,
                                  IRecipeManager recipeManager, IExternalServiceManager externalServiceManager) : base(memoryCache,
                                                                                                                       userManager, recipeManager, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
示例#9
0
 public ActionDispatcher(IEnumerable <IActionHandler> handlers, IRecipeManager recipeManager,
                         ILogger <ActionDispatcher> logger)
 {
     _handlers      = handlers;
     _recipeManager = recipeManager;
     _logger        = logger;
 }
 public RecipeTriggersController(IRecipeManager recipeManager, UserManager <User> userManager,
                                 IEnumerable <ITriggerDescriptor> triggerDescriptors)
 {
     _recipeManager      = recipeManager;
     _userManager        = userManager;
     _triggerDescriptors = triggerDescriptors;
 }
        public AdminController(
            IEnumerable <IExtensionDisplayEventHandler> extensionDisplayEventHandlers,
            IBoyingServices services,
            IModuleService moduleService,
            IDataMigrationManager dataMigrationManager,
            IExtensionManager extensionManager,
            IFeatureManager featureManager,
            IRecipeHarvester recipeHarvester,
            IRecipeManager recipeManager,
            ShellDescriptor shellDescriptor,
            ShellSettings shellSettings,
            IShapeFactory shapeFactory)
        {
            Services = services;
            _extensionDisplayEventHandler = extensionDisplayEventHandlers.FirstOrDefault();
            _moduleService        = moduleService;
            _dataMigrationManager = dataMigrationManager;
            _extensionManager     = extensionManager;
            _featureManager       = featureManager;
            _recipeHarvester      = recipeHarvester;
            _recipeManager        = recipeManager;
            _shellDescriptor      = shellDescriptor;
            _shellSettings        = shellSettings;
            Shape = shapeFactory;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
示例#12
0
 public TriggerDispatcher(IEnumerable <ITriggerHandler> handlers, IRecipeManager recipeManager,
                          IActionDispatcher actionDispatcher)
 {
     _handlers         = handlers;
     _recipeManager    = recipeManager;
     _actionDispatcher = actionDispatcher;
 }
示例#13
0
 public PlaceOrderController(IMemoryCache memoryCache,
                             UserManager <User> userManager,
                             IRecipeManager recipeManager, IExternalServiceManager externalServiceManager) : base(memoryCache,
                                                                                                                  userManager, recipeManager, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
示例#14
0
 public RecipeExecutor(
     IRecipeParser recipeParser,
     IRecipeManager recipeManager,
     IShellDescriptorManager shellDescriptorManager)
 {
     _recipeManager          = recipeManager;
     _shellDescriptorManager = shellDescriptorManager;
 }
 public NBXplorerNewTransactionController(IRecipeManager recipeManager,
                                          UserManager <User> userManager,
                                          IMemoryCache memoryCache,
                                          IExternalServiceManager externalServiceManager) : base(recipeManager, userManager,
                                                                                                 memoryCache, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
 public DynamicServiceService(ExternalServiceData data, IRecipeManager recipeManager,
                              IActionDispatcher actionDispatcher, IExternalServiceManager externalServiceManager) : base(data)
 {
     _data                   = data;
     _recipeManager          = recipeManager;
     _actionDispatcher       = actionDispatcher;
     _externalServiceManager = externalServiceManager;
 }
 public RecipeActionFooterViewComponent(IEnumerable <ITriggerDescriptor> triggerDescriptors,
                                        IEnumerable <IActionDescriptor> actionDescriptors,
                                        IRecipeManager recipeManager)
 {
     _triggerDescriptors = triggerDescriptors;
     _actionDescriptors  = actionDescriptors;
     _recipeManager      = recipeManager;
 }
示例#18
0
 public RecipeExecutor(
     IRecipeParser recipeParser,
     IRecipeManager recipeManager,
     IShellDescriptorManager shellDescriptorManager)
 {
     _recipeManager = recipeManager;
     _shellDescriptorManager = shellDescriptorManager;
 }
示例#19
0
 MainWindowViewModel(IRecipeManager recipeManager)
 {
     recipes = new List <RecipeModel>();
     foreach (RecipeModel recipe in recipes)
     {
         recipes.Add(new RecipeModel(recipe));
     }
 }
        public override void Init()
        {
            base.Init();

            _recipeManager   = _container.Resolve <IRecipeManager>();
            _recipeParser    = _container.Resolve <IRecipeParser>();
            _recipeHarvester = _container.Resolve <IRecipeHarvester>();
        }
示例#21
0
 public MenuController(IMapper mapper, IMenuManager menuManager,
                       IRecipeManager recipeManager, IDayManager dayManager)
 {
     _mapper        = mapper;
     _menuManager   = menuManager;
     _recipeManager = recipeManager;
     _dayManager    = dayManager;
 }
示例#22
0
 public GenerateNextAddressController(IMemoryCache memoryCache,
                                      UserManager <User> userManager,
                                      IRecipeManager recipeManager,
                                      IExternalServiceManager externalServiceManager) : base(
         memoryCache,
         userManager, recipeManager, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
示例#23
0
 public MainWindowViewModel(IRecipeManager recipeManager)
 {
     this.recipeManager = recipeManager;
     recipes            = new ObservableCollection <RecipeModel>();
     foreach (var recipe in recipeManager.GetRecipes())
     {
         recipes.Add(new RecipeModel(recipe));
     }
 }
 public NBXplorerGetBalanceController(IMemoryCache memoryCache,
                                      UserManager <User> userManager,
                                      IRecipeManager recipeManager,
                                      IExternalServiceManager externalServiceManager) : base(
         memoryCache,
         userManager, recipeManager, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
示例#25
0
 public GetPaymentsFromInvoiceController(IMemoryCache memoryCache,
                                         UserManager <User> userManager,
                                         IRecipeManager recipeManager,
                                         IExternalServiceManager externalServiceManager) : base(
         memoryCache,
         userManager, recipeManager, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
 public BTCPayEmailReceiptsController(
     IExternalServiceManager externalServiceManager,
     UserManager <User> userManager,
     IRecipeManager recipeManager)
 {
     _externalServiceManager = externalServiceManager;
     _userManager            = userManager;
     _recipeManager          = recipeManager;
 }
 public TimerController(
     IRecipeManager recipeManager,
     UserManager <User> userManager,
     IMemoryCache memoryCache)
 {
     _recipeManager = recipeManager;
     _userManager   = userManager;
     _memoryCache   = memoryCache;
 }
 public SendTransactionController(IMemoryCache memoryCache,
                                  UserManager <User> userManager,
                                  IExternalServiceManager externalServiceManager,
                                  IRecipeManager recipeManager) : base(
         memoryCache,
         userManager, recipeManager, externalServiceManager)
 {
     _externalServiceManager = externalServiceManager;
 }
 public FiatExchangeConversionController(
     IExternalServiceManager externalServiceManager,
     UserManager <User> userManager,
     IRecipeManager recipeManager)
 {
     _externalServiceManager = externalServiceManager;
     _userManager            = userManager;
     _recipeManager          = recipeManager;
 }
示例#30
0
 public DCAController(
     IExternalServiceManager externalServiceManager,
     UserManager <User> userManager,
     IRecipeManager recipeManager)
 {
     _externalServiceManager = externalServiceManager;
     _userManager            = userManager;
     _recipeManager          = recipeManager;
 }
示例#31
0
 public RecipesCommands(
     IRecipeHarvester recipeHarvester,
     IRecipeManager recipeManager,
     IExtensionManager extensionManager,
     IRecipeResultAccessor recipeResultAccessor) {
     _recipeHarvester = recipeHarvester;
     _recipeManager = recipeManager;
     _extensionManager = extensionManager;
     _recipeResultAccessor = recipeResultAccessor;
 }
示例#32
0
 protected BaseActionController(IMemoryCache memoryCache,
                                UserManager <User> userManager,
                                IRecipeManager recipeManager,
                                IExternalServiceManager externalServiceManager)
 {
     _memoryCache            = memoryCache;
     _userManager            = userManager;
     _recipeManager          = recipeManager;
     _externalServiceManager = externalServiceManager;
 }
 public void Initialize()
 {
     this.ingredientRepository       = new IngredientRepositoryMock();
     this.recipeRepository           = new RecipeRepositoryMock();
     this.recipeIngredientRepository = new RecipeIngredientRepositoryMock();
     this.recipeManager = new RecipeManager(
         this.ingredientRepository,
         this.recipeRepository,
         this.recipeIngredientRepository
         );
 }
        public AdminController(
            IEnumerable<Orchard.Modules.Events.IExtensionDisplayEventHandler> extensionDisplayEventHandlers,
            IOrchardServices services,
            IModuleService moduleService,
            IDataMigrationManager dataMigrationManager,
            IReportsCoordinator reportsCoordinator,
            IExtensionManager extensionManager,
            IFeatureManager featureManager,
            IRecipeHarvester recipeHarvester,
            IRecipeManager recipeManager,
            ShellDescriptor shellDescriptor,
            ShellSettings shellSettings,
            IShapeFactory shapeFactory,
            IPackageService packageService,
            IMimeTypeProvider mimeTypeProvider,
            ISiteThemeService siteThemeService,
            IThemeService themeService)
        {
            Services = services;
            _extensionDisplayEventHandler = extensionDisplayEventHandlers.FirstOrDefault();
            _moduleService = moduleService;
            _dataMigrationManager = dataMigrationManager;
            _reportsCoordinator = reportsCoordinator;
            _extensionManager = extensionManager;
            _featureManager = featureManager;
            _recipeHarvester = recipeHarvester;
            _recipeManager = recipeManager;
            _shellDescriptor = shellDescriptor;
            _shellSettings = shellSettings;
            Shape = shapeFactory;
            _packageService = packageService;
            _mimeTypeProvider = mimeTypeProvider;

            _siteThemeService = siteThemeService;
            _themeService = themeService;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;

            _tempPackageStoragePath = new Lazy<string>(() =>
            {
                var path = HostingEnvironment.MapPath("~/App_Data/Packages");
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                return path;
            });
        }
示例#35
0
 public ImportExportService(
     IOrchardServices orchardServices,
     IContentDefinitionManager contentDefinitionManager,
     IContentDefinitionWriter contentDefinitionWriter,
     IAppDataFolder appDataFolder,
     IRecipeParser recipeParser, 
     IRecipeManager recipeManager, 
     IShellDescriptorManager shellDescriptorManager) {
     _orchardServices = orchardServices;
     _contentDefinitionManager = contentDefinitionManager;
     _contentDefinitionWriter = contentDefinitionWriter;
     _appDataFolder = appDataFolder;
     _recipeParser = recipeParser;
     _recipeManager = recipeManager;
     _shellDescriptorManager = shellDescriptorManager;
     Logger = NullLogger.Instance;
     T = NullLocalizer.Instance;
 }
 public ImportExportService(
     IOrchardServices orchardServices,
     IContentDefinitionManager contentDefinitionManager,
     IContentDefinitionWriter contentDefinitionWriter,
     IAppDataFolder appDataFolder,
     IRecipeParser recipeParser, 
     IRecipeManager recipeManager,
     IShellDescriptorManager shellDescriptorManager,
     IClock clock,
     IEnumerable<IExportEventHandler> exportEventHandlers) {
     _orchardServices = orchardServices;
     _contentDefinitionManager = contentDefinitionManager;
     _contentDefinitionWriter = contentDefinitionWriter;
     _appDataFolder = appDataFolder;
     _recipeParser = recipeParser;
     _recipeManager = recipeManager;
     _shellDescriptorManager = shellDescriptorManager;
     _clock = clock;
     _exportEventHandlers = exportEventHandlers;
     Logger = NullLogger.Instance;
     T = NullLocalizer.Instance;
 }
        public PackagingServicesController(
            ShellSettings shellSettings,
            IPackageManager packageManager,
            IPackagingSourceManager packagingSourceManager,
            IAppDataFolderRoot appDataFolderRoot,
            IOrchardServices services,
            IModuleService moduleService,
            IRecipeHarvester recipeHarvester,
            IRecipeManager recipeManager) {

            _shellSettings = shellSettings;
            _packageManager = packageManager;
            _appDataFolderRoot = appDataFolderRoot;
            _moduleService = moduleService;
            _recipeHarvester = recipeHarvester;
            _recipeManager = recipeManager;
            _packagingSourceManager = packagingSourceManager;
            Services = services;

            T = NullLocalizer.Instance;
            Logger = Logging.NullLogger.Instance;
        }
 public void Setup()
 {
     kernel = new StandardKernel(new NinjectAPIModule());
     recipeManager = kernel.Get<RecipeManager>();
 }     
示例#39
0
 public RecipeController(IRecipeManager recipeManager, IProductManager productManager)
 {
     RecipeManager = recipeManager;
     ProductManager = productManager;
 }
示例#40
0
        public void Init() {
            _tempFolderName = Path.GetTempFileName();
            File.Delete(_tempFolderName);
            var assembly = GetType().Assembly;
            foreach (var name in assembly.GetManifestResourceNames()) {
                if (name.StartsWith(DataPrefix)) {
                    string text;
                    using (var stream = assembly.GetManifestResourceStream(name)) {
                        using (var reader = new StreamReader(stream))
                            text = reader.ReadToEnd();

                    }

                    // Pro filtering
                    var relativePath = name
                        .Substring(DataPrefix.Length)
                        .Replace(".txt", ":txt")
                        .Replace(".recipe.xml", ":recipe:xml")
                        .Replace('.', Path.DirectorySeparatorChar)
                        .Replace(":txt", ".txt")
                        .Replace(":recipe:xml", ".recipe.xml");

                    var targetPath = Path.Combine(_tempFolderName, relativePath);

                    Directory.CreateDirectory(Path.GetDirectoryName(targetPath));
                    using (var stream = new FileStream(targetPath, FileMode.Create)) {
                        using (var writer = new StreamWriter(stream)) {
                            writer.Write(text);
                        }
                    }
                }
            }

            var builder = new ContainerBuilder();
            var harvester = new ExtensionHarvester(new StubCacheManager(), new StubWebSiteFolder(), new Mock<ICriticalErrorProvider>().Object);
            _folders = new ModuleFolders(new[] { _tempFolderName }, harvester);
            builder.RegisterType<RecipeManager>().As<IRecipeManager>();
            builder.RegisterType<RecipeHarvester>().As<IRecipeHarvester>();
            builder.RegisterType<RecipeStepExecutor>().As<IRecipeStepExecutor>();
            builder.RegisterType<StubStepQueue>().As<IRecipeStepQueue>().InstancePerLifetimeScope();
            builder.RegisterType<StubRecipeJournal>().As<IRecipeJournal>();
            builder.RegisterType<StubRecipeScheduler>().As<IRecipeScheduler>();
            builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
            builder.RegisterType<StubAppDataFolder>().As<IAppDataFolder>();
            builder.RegisterType<StubClock>().As<IClock>();
            builder.RegisterType<StubCacheManager>().As<ICacheManager>();
            builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
            builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
            builder.RegisterInstance(_folders).As<IExtensionFolders>();
            builder.RegisterInstance(new Mock<IRecipeExecuteEventHandler>().Object);
            builder.RegisterType<Environment.Extensions.ExtensionManagerTests.StubLoaders>().As<IExtensionLoader>();
            builder.RegisterType<RecipeParser>().As<IRecipeParser>();
            builder.RegisterType<StubWebSiteFolder>().As<IWebSiteFolder>();
            builder.RegisterType<CustomRecipeHandler>().As<IRecipeHandler>();

            _container = builder.Build();
            _recipeManager = _container.Resolve<IRecipeManager>();
            _recipeParser = _container.Resolve<IRecipeParser>();
            _recipeHarvester = _container.Resolve<IRecipeHarvester>();
        }
示例#41
0
        public override void Init() {
            base.Init();

            _recipeManager = _container.Resolve<IRecipeManager>();
            _recipeParser = _container.Resolve<IRecipeParser>();
            _recipeHarvester = _container.Resolve<IRecipeHarvester>();
        }
示例#42
0
 public RecipesCommands(IRecipeHarvester recipeHarvester, IRecipeManager recipeManager, IExtensionManager extensionManager)
 {
     _recipeHarvester = recipeHarvester;
     _recipeManager = recipeManager;
     _extensionManager = extensionManager;
 }