Esempio n. 1
0
 // GET: Scheduling/Form/:id
 public ActionResult Form(int?id)
 {
     Models.ScheduleAddVM model = null;
     if (id != null)
     {
         IDeviceScenarioService deviceScenarioService = DependencyUtils.Resolve <IDeviceScenarioService>();
         IDeviceService         deviceService         = DependencyUtils.Resolve <IDeviceService>();
         IScenarioService       scenarioService       = DependencyUtils.Resolve <IScenarioService>();
         var item = deviceScenarioService.Get(id);
         if (item != null)
         {
             model = new Models.ScheduleAddVM
             {
                 ScenarioID       = item.ScenarioID,
                 DeviceScenarioId = item.DeviceScenationID,
                 DeviceID         = item.DeviceID,
                 isHorizontal     = scenarioService.GetScenarioOrientationById(item.ScenarioID) ?? true,
                 isFixed          = item.TimesToPlay == null,
                 StartTime        = item.StartTime,
                 TimeToPlay       = item.TimesToPlay,
                 EndTime          = item.EndTime,
                 LayoutID         = item.LayoutID,
             };
         }
     }
     return(View(model));
 }
Esempio n. 2
0
 public ScenarioController(IScenarioService scenarioService, IScenarioExecutionService executionService, IHatcheryService hatcheryService, IFileUploadService fileUploadService)
 {
     this.scenarioService = scenarioService;
     this.executionService = executionService;
     this.hatcheryService = hatcheryService;
     this.fileUploadService = fileUploadService;
 }
Esempio n. 3
0
 public TopicController(ILogger <TopicController> logger, IScenarioService scenarioService, ITopicService topicService, IAuthenticationManager authenticationManager)
 {
     _logger                = logger;
     _scenarioService       = scenarioService;
     _topicService          = topicService;
     _authenticationManager = authenticationManager;
 }
Esempio n. 4
0
        public static List <Models.ScheduleVM> GetSchedulesByBrandId()
        {
            IDeviceScenarioService deviceScenarioService = DependencyUtils.Resolve <IDeviceScenarioService>();
            var              scheduleVMs     = new List <Models.ScheduleVM>();
            IBrandService    brandService    = DependencyUtils.Resolve <IBrandService>();
            var              user            = Helper.GetCurrentUser();
            var              scheduleList    = deviceScenarioService.GetSchedulesByBrandID(user.BrandID);
            IDeviceService   deviceService   = DependencyUtils.Resolve <IDeviceService>();
            IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();

            foreach (var item in scheduleList)
            {
                var s = new Models.ScheduleVM
                {
                    ScenarioID       = item.ScenarioID,
                    DeviceScenarioId = item.DeviceScenationID,
                    DeviceID         = item.DeviceID,
                    DeviceName       = deviceService.GetDeviceNameByID(item.DeviceID),
                    ScenarioTitle    = scenarioService.GetScenarioNameById(item.ScenarioID),
                    StartTime        = item.StartTime,
                    TimeToPlay       = item.TimesToPlay,
                    EndTime          = item.EndTime,
                };
                scheduleVMs.Add(s);
            }
            return(scheduleVMs);
        }
Esempio n. 5
0
        public async System.Threading.Tasks.Task <ActionResult> Add(Models.ScheduleAddVM model)
        {
            IDeviceScenarioService deviceScenarioService = DependencyUtils.Resolve <IDeviceScenarioService>();

            if (ModelState.IsValid && CheckTimeValid(model.DeviceID, model.StartTime, model.EndTime))
            {
                if (model.isFixed)
                {
                    model.TimeToPlay = null;
                }
                else
                {
                    model.EndTime = null;
                }
                IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();
                var schedule = new Data.Models.Entities.DeviceScenario
                {
                    ScenarioID  = model.ScenarioID,
                    DeviceID    = model.DeviceID,
                    TimesToPlay = model.TimeToPlay,
                    StartTime   = model.StartTime,
                    EndTime     = model.EndTime,
                    LayoutID    = scenarioService.GetLayoutIDById(model.ScenarioID),
                };
                await deviceScenarioService.CreateAsync(schedule);

                return(new ContentResult
                {
                    Content = string.Format("<script type='text/javascript'>window.parent.location.href = '{0}';</script>", Url.Action("Index", "Scheduling")),
                    ContentType = "text/html"
                });
            }
            return(View("Form", model));
        }
 // GET: Scheduling/Form/:id
 public ActionResult Form(int?id)
 {
     Models.AdvancedScheduleAddVM model = null;
     ViewBag.TimeSlotList = this.GetTimeSlots();
     if (id != null)
     {
         IScheduleService scheduleService = DependencyUtils.Resolve <IScheduleService>();
         IDeviceService   deviceService   = DependencyUtils.Resolve <IDeviceService>();
         IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();
         var item = scheduleService.Get(id);
         if (item != null)
         {
             model = new Models.AdvancedScheduleAddVM
             {
                 ScenarioID      = item.ScenarioID,
                 ScheduleID      = item.ScheduleID,
                 DeviceID        = item.DeviceID,
                 isHorizontal    = scenarioService.GetScenarioOrientationById(item.ScenarioID) ?? true,
                 LayoutID        = item.LayoutID,
                 Priority        = item.Priority,
                 TimeFilterPoint = item.TimeFilter,
                 DayFilterPoint  = item.DayFilter,
                 isEnable        = item.isEnable,
             };
         }
     }
     return(View(model));
 }
Esempio n. 7
0
 public ScenarioController(IScenarioService scenarioService, IScenarioExecutionService executionService, IHatcheryService hatcheryService, IFileUploadService fileUploadService)
 {
     this.scenarioService   = scenarioService;
     this.executionService  = executionService;
     this.hatcheryService   = hatcheryService;
     this.fileUploadService = fileUploadService;
 }
        // GET: AdvancedScheduling
        public ActionResult Index()
        {
            IDeviceService   deviceService   = DependencyUtils.Resolve <IDeviceService>();
            IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();
            var ScheduleList = scheduleService.Get().ToList();
            var ScheduleVMs  = new List <DSS.Models.AdvancedScheduleVM>();

            foreach (var item in ScheduleList)
            {
                var s = new DSS.Models.AdvancedScheduleVM
                {
                    ScenarioID    = item.ScenarioID,
                    ScheduleID    = item.ScheduleID,
                    DeviceID      = item.DeviceID,
                    isEnable      = item.isEnable,
                    DeviceName    = deviceService.GetDeviceNameByID(item.DeviceID),
                    ScenarioTitle = scenarioService.GetScenarioNameById(item.ScenarioID),
                };
                ScheduleVMs.Add(s);
            }
            ViewBag.ScheduleList  = ScheduleVMs;
            ViewBag.addSuccess    = Session["ADD_RESULT"] ?? false;
            ViewBag.updateSuccess = Session["UPDATE_RESULT"] ?? false;
            Session.Clear();
            return(View());
        }
Esempio n. 9
0
 public OutputConfigController(IMeasurementService measurementService, IOutputCategoryService outputCategoryService,
     IOutputConfigService outputConfigService, IScenarioService scenarioService)
 {
     _measurementService = measurementService;
     _outputCategoryService = outputCategoryService;
     _outputConfigService = outputConfigService;
     _scenarioService = scenarioService;
 }
Esempio n. 10
0
 public OutputConfigController(IMeasurementService measurementService, IOutputCategoryService outputCategoryService,
                               IOutputConfigService outputConfigService, IScenarioService scenarioService)
 {
     _measurementService    = measurementService;
     _outputCategoryService = outputCategoryService;
     _outputConfigService   = outputConfigService;
     _scenarioService       = scenarioService;
 }
 public HighlightsController(
     IRepository<ScenarioRecord> scenarioRepository,
     IRepository<TaskRecord>     taskRepository,
     IRepository<StepRecord>     stepRepository,
     IScenarioService            scenarioService
 )
 {
     _scenarioRepository = scenarioRepository;
     _taskRepository     = taskRepository;
     _stepRepository     = stepRepository;
     _scenarioService    = scenarioService;
 }
 public JsonResult CheckPlaylistIdIsUsed(int id)
 {
     try
     {
         IScenarioItemService scenarioItemService = DependencyUtils.Resolve <IScenarioItemService>();
         IScenarioService     scenarioService     = DependencyUtils.Resolve <IScenarioService>();
         var scenarioItem    = scenarioItemService.Get().ToList();
         var scenario        = scenarioService.Get().ToList();
         var scenarioItemVMs = new List <Models.ScenarioItemVM>();
         var scenarioVMs     = new List <Models.ScenarioDetailVM>();
         //check playlistId have in playlistItem
         foreach (var item in scenarioItem)
         {
             if (item.PlaylistID == id)
             {
                 var b = new Models.ScenarioItemVM
                 {
                     ScenarioId = item.ScenarioID,
                 };
                 scenarioItemVMs.Add(b);
             }
         }
         // if scenarioItemVMs != null, get Scenario Title by ScenarioId
         if (scenarioItemVMs.Count != 0)
         {
             foreach (var item in scenarioItemVMs)
             {
                 foreach (var itemScenario in scenario)
                 {
                     if (item.ScenarioId == itemScenario.ScenarioID)
                     {
                         var b = new Models.ScenarioDetailVM
                         {
                             Title = itemScenario.Title,
                         };
                         scenarioVMs.Add(b);
                     }
                 }
             }
         }
         return(Json(new
         {
             isUsing = scenarioItemVMs.Count != 0,
             scenarioVMlist = scenarioVMs,
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 13
0
 /// <summary>
 /// Dependency injection
 /// </summary>
 /// <param name="resourceService">provides all services except authorization</param>
 /// <param name="scenarioService">check for stale scenario data</param>
 /// <param name="scenarioGroupService">provides authorization</param>
 /// <param name="docuService">provides documentary information</param>
 /// <param name="paramService">provides param data</param>
 public ResourceController(IResourceServiceFacade resourceService,
     IScenarioService scenarioService,
     IScenarioGroupService scenarioGroupService,
     IDocuService docuService,
     IParamService paramService)
 {
     if (resourceService == null)
     {
         throw new ArgumentNullException("resourceService");
     }
     _ResourceService = resourceService;
     _ScenarioService = scenarioService;
     _ScenarioGroupService = scenarioGroupService;
     _DocuService = docuService;
     _ParamService = paramService;
 }
 public StubRequestExecutor(
     IEnumerable <IConditionChecker> conditionCheckers,
     IFinalStubDeterminer finalStubDeterminer,
     ILogger <StubRequestExecutor> logger,
     IRequestLoggerFactory requestLoggerFactory,
     IStubContext stubContainer,
     IStubResponseGenerator stubResponseGenerator,
     IScenarioService scenarioService)
 {
     _conditionCheckers   = conditionCheckers;
     _finalStubDeterminer = finalStubDeterminer;
     _logger = logger;
     _requestLoggerFactory  = requestLoggerFactory;
     _stubContainer         = stubContainer;
     _stubResponseGenerator = stubResponseGenerator;
     _scenarioService       = scenarioService;
 }
Esempio n. 15
0
 public RecommendationController(
     ILogger logger,
     IMarkdownService markdownService,
     IScenarioService scenarioService,
     IScenarioWebService scenarioWebService,
     IScenarioResultService scenarioResultsService,
     IRecommendationProductService recommendationProductService,
     IOrganisationDataProvider organisationDataProvider)
 {
     _logger                       = logger;
     _markdownService              = markdownService;
     _scenarioService              = scenarioService;
     _scenarioWebService           = scenarioWebService;
     _scenarioResultsService       = scenarioResultsService;
     _recommendationProductService = recommendationProductService;
     _organisationDataProvider     = organisationDataProvider;
 }
Esempio n. 16
0
        public ScenarioListDialog(IScenarioService scenarioService) : base(nameof(ScenarioListDialog))
        {
            _scenarioService = scenarioService;
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new ChoicePrompt(nameof(ChoicePrompt))
            {
                Style = ListStyle.SuggestedAction
            });

            var waterfallStep = new WaterfallStep[]
            {
                ShowChoiceDialog,
                AnswerToChoiceDialog
            };

            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallStep));
            InitialDialogId = nameof(WaterfallDialog);
        }
        public static List <Models.ScenarioRefVM> GetScenarioReferenceByBrandId(bool isHorizontal)
        {
            IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();
            IBrandService    brandService    = DependencyUtils.Resolve <IBrandService>();
            var user           = Helper.GetCurrentUser();
            var scenarioRefVMs = new List <Models.ScenarioRefVM>();
            var scenarioList   = scenarioService.GetScenarioIdByBrandIdAndLayoutType(user.BrandID, isHorizontal);

            foreach (var item in scenarioList)
            {
                var s = new Models.ScenarioRefVM
                {
                    ScenarioId = item.ScenarioID,
                    Title      = item.Title,
                };
                scenarioRefVMs.Add(s);
            }
            return(scenarioRefVMs);
        }
Esempio n. 18
0
 public MainDirectories(IAccountService accountService, ICustomerService customerService, IProductCategoryService productCategoryService,
                        ICurrencyService currencyService, IStoreService storeService, IProductService productService,
                        IMachineService machineService, IOutageService outageService, IChannelService channelService,
                        IPromotionService promotionService, IEntityService entityService, IScenarioService scenarioService,
                        IAccountingService accountingService, IProductSubcategoryService productSubcategoryService)
 {
     _accountService            = accountService;
     _customerService           = customerService;
     _productCategoryService    = productCategoryService;
     _currencyService           = currencyService;
     _storeService              = storeService;
     _machineService            = machineService;
     _outageService             = outageService;
     _channelService            = channelService;
     _promotionService          = promotionService;
     _entityService             = entityService;
     _scenarioService           = scenarioService;
     _accountingService         = accountingService;
     _productService            = productService;
     _productSubcategoryService = productSubcategoryService;
 }
        public async System.Threading.Tasks.Task <ActionResult> Update(Models.AdvancedScheduleAddVM model)
        {
            IScheduleService scheduleService = DependencyUtils.Resolve <IScheduleService>();
            IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();

            if (ModelState.IsValid)
            {
                var schedule   = scheduleService.Get(model.ScheduleID);
                int dayFilter  = 0;
                int timeFilter = 0;
                foreach (var item in model.DayFilter)
                {
                    dayFilter += item;
                }
                foreach (var item in model.TimeFilter)
                {
                    timeFilter += item;
                }
                if (schedule != null)
                {
                    schedule.ScenarioID = model.ScenarioID;
                    schedule.DeviceID   = model.DeviceID;
                    schedule.LayoutID   = scenarioService.GetLayoutIDById(model.ScenarioID);
                    schedule.DayFilter  = dayFilter;
                    schedule.TimeFilter = timeFilter;
                    schedule.Priority   = model.Priority;
                    schedule.isEnable   = model.isEnable;
                    await scheduleService.UpdateAsync(schedule);

                    Session.Clear();
                    Session["UPDATE_RESULT"] = true;
                }
                return(new ContentResult
                {
                    Content = string.Format("<script type='text/javascript'>window.parent.location.href = '{0}';</script>", Url.Action("Index", "AdvancedScheduling")),
                    ContentType = "text/html"
                });
            }
            return(View("Form", model));
        }
        public static List <Models.ScenarioVM> GetScenariosByBrandId()
        {
            IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();
            var           scenarioVMs        = new List <Models.ScenarioVM>();
            IBrandService brandService       = DependencyUtils.Resolve <IBrandService>();
            var           user         = Helper.GetCurrentUser();
            var           scenarioList = scenarioService.GetScenarioIdByBrandId(user.BrandID);

            foreach (var item in scenarioList)
            {
                var s = new Models.ScenarioVM
                {
                    ScenarioId  = item.ScenarioID,
                    Description = item.Description,
                    LayoutId    = item.LayoutID,
                    Title       = item.Title,
                    IsPublic    = (bool)item.isPublic
                };
                scenarioVMs.Add(s);
            }
            return(scenarioVMs);
        }
        public async System.Threading.Tasks.Task <ActionResult> Add(Models.AdvancedScheduleAddVM model)
        {
            IScheduleService scheduleService = DependencyUtils.Resolve <IScheduleService>();

            if (ModelState.IsValid)
            {
                int dayFilter  = 0;
                int timeFilter = 0;
                foreach (var item in model.DayFilter)
                {
                    dayFilter += item;
                }
                foreach (var item in model.TimeFilter)
                {
                    timeFilter += item;
                }
                IScenarioService scenarioService = DependencyUtils.Resolve <IScenarioService>();
                var schedule = new Data.Models.Entities.Schedule
                {
                    ScenarioID = model.ScenarioID,
                    DeviceID   = model.DeviceID,
                    LayoutID   = scenarioService.GetLayoutIDById(model.ScenarioID),
                    DayFilter  = dayFilter,
                    TimeFilter = timeFilter,
                    Priority   = model.Priority,
                    isEnable   = model.isEnable,
                };
                await scheduleService.CreateAsync(schedule);

                Session.Clear();
                Session["ADD_RESULT"] = true;
                return(new ContentResult
                {
                    Content = string.Format("<script type='text/javascript'>window.parent.location.href = '{0}';</script>", Url.Action("Index", "AdvancedScheduling")),
                    ContentType = "text/html"
                });
            }
            return(View("Form", model));
        }
Esempio n. 22
0
        public ScenarioDialog(IScenarioService scenarioService,
                              IUserService userService,
                              INotificationService notificationService,
                              IList <IBotCommand> botCommands)
            : base(nameof(ScenarioDialog), botCommands)
        {
            _scenarioService     = scenarioService;
            _userService         = userService;
            _notificationService = notificationService;

            var waterfallStep = new WaterfallStep[]
            {
                Ask,
                Check
            };

            AddDialog(new WaitTextPuzzleDialog(botCommands, notificationService));
            AddDialog(new TextPuzzleDialog(botCommands));
            AddDialog(new TextPrompt(nameof(TextPrompt)));
            AddDialog(new WaterfallDialog(nameof(WaterfallDialog), waterfallStep));
            AddDialog(new ScenarioListDialog(_scenarioService));
            InitialDialogId = nameof(WaterfallDialog);
        }
Esempio n. 23
0
 public SetScenarioStateResponseWriter(IScenarioService scenarioService)
 {
     _scenarioService = scenarioService;
 }
        public void SetUp()
        {
            _mockCategoryRepository = new Mock<IRepositoryAsync<Category>>();
            _mockClassificationRepository = new Mock<IRepositoryAsync<Classification>>();
            _mockFlowRepository = new Mock<IRepositoryAsync<Flow>>();
            _mockFlowPropertyRepository = new Mock<IRepositoryAsync<FlowProperty>>();
            _mockFlowTypeRepository = new Mock<IRepositoryAsync<FlowType>>();
            _mockFragmentRepository = new Mock<IRepositoryAsync<Fragment>>();
            _mockFragmentFlowRepository = new Mock<IRepositoryAsync<FragmentFlow>>();
            _mockFragmentStageRepository = new Mock<IRepositoryAsync<FragmentStage>>();
            _mockImpactCategoryRepository = new Mock<IRepositoryAsync<ImpactCategory>>();
            _mockLCIAMethodRepository = new Mock<IRepositoryAsync<LCIAMethod>>();
            _mockNodeCacheRepository = new Mock<IRepositoryAsync<NodeCache>>();
            _mockProcessRepository = new Mock<IRepositoryAsync<Process>>();
            _mockProcessFlowRepository = new Mock<IRepositoryAsync<ProcessFlow>>();
            _mockScenarioRepository = new Mock<IRepositoryAsync<Scenario>>();
            _mockScenarioGroupRepository = new Mock<IRepositoryAsync<ScenarioGroup>>();
            _mockFragmentNodeProcessRepository = new Mock<IRepositoryAsync<FragmentNodeProcess>>();
            _mockFragmentNodeFragmentRepository = new Mock<IRepositoryAsync<FragmentNodeFragment>>();
            _mockFlowFlowPropertyRepository = new Mock<IRepositoryAsync<FlowFlowProperty>>();
            _mockDependencyParamRepository = new Mock<IRepositoryAsync<DependencyParam>>();
            _mockFlowPropertyParamRepository = new Mock<IRepositoryAsync<FlowPropertyParam>>();
            _mockParamRepository = new Mock<IRepositoryAsync<Param>>();
            _mockScoreCacheRepository = new Mock<IRepositoryAsync<ScoreCache>>();
            _mockProcessSubstitutionRepository = new Mock<IRepositoryAsync<ProcessSubstitution>>();
            _mockFragmentSubstitutionRepository = new Mock<IRepositoryAsync<FragmentSubstitution>>();
            _mockBackgroundSubstitutionRepository = new Mock<IRepositoryAsync<BackgroundSubstitution>>();
            _mockBackgroundRepository = new Mock<IRepositoryAsync<Background>>();
            _mockProcessEmissionParamRepository = new Mock<IRepositoryAsync<ProcessEmissionParam>>();
            _mockFlowPropertyEmissionRepository = new Mock<IRepositoryAsync<FlowPropertyEmission>>();
            _mockProcessDissipationRepository = new Mock<IRepositoryAsync<ProcessDissipation>>();
            _mockProcessDissipationParamRepository = new Mock<IRepositoryAsync<ProcessDissipationParam>>();
            _mockLCIARepository = new Mock<IRepositoryAsync<LCIA>>();
            _mockCharacterizationParamRepository = new Mock<IRepositoryAsync<CharacterizationParam>>();
            _mockUnitOfWork = new Mock<IUnitOfWork>();

            //we do need to pass a mock repository to all these services as the ResourceController
            //expects the resource facade to be passed to it.  In turn the resource facade takes these
            //service types and methods.
            _flowTypeService = new FlowTypeService(_mockFlowTypeRepository.Object);
            //_categoryService = new CategoryService(_mockCategoryRepository.Object);
            //_classificationService = new ClassificationService(_mockClassificationRepository.Object);
            _fragmentService = new FragmentService(_mockFragmentRepository.Object);
            _fragmentFlowService = new FragmentFlowService(_mockFragmentFlowRepository.Object);
            //_fragmentStageService = new FragmentStageService(_mockFragmentStageRepository.Object);
            _flowService = new FlowService(_mockFlowRepository.Object);
            _flowPropertyService = new FlowPropertyService(_mockFlowPropertyRepository.Object);
            _impactCategoryService = new ImpactCategoryService(_mockImpactCategoryRepository.Object);
            _lciaMethodService = new LCIAMethodService(_mockLCIAMethodRepository.Object);
            _processService = new ProcessService(_mockProcessRepository.Object);
            _processFlowService = new ProcessFlowService(_mockProcessFlowRepository.Object);
            _scenarioService = new ScenarioService(_mockScenarioRepository.Object);
            _scenarioGroupService = new ScenarioGroupService(_mockScenarioGroupRepository.Object);
            _nodeCacheService = new NodeCacheService(_mockNodeCacheRepository.Object);
            //_fragmentNodeProcessService = new FragmentNodeProcessService(_mockFragmentNodeProcessRepository.Object);
            //_fragmentNodeFragmentService = new FragmentNodeFragmentService(_mockFragmentNodeFragmentRepository.Object);
            _flowFlowPropertyService = new FlowFlowPropertyService(_mockFlowFlowPropertyRepository.Object);
            //_dependencyParamService = new DependencyParamService(_mockDependencyParamRepository.Object);
            //_flowPropertyParamService = new FlowPropertyParamService(_mockFlowPropertyParamRepository.Object);
            //_flowPropertyParamService = new FlowPropertyParamService(_mockFlowPropertyParamRepository.Object);
            _paramService = new ParamService(_mockParamRepository.Object);
            _scoreCacheService = new ScoreCacheService(_mockScoreCacheRepository.Object);
            //_processSubstitutionService = new ProcessSubstitutionService(_mockProcessSubstitutionRepository.Object);
            //_fragmentSubstitutionService = new FragmentSubstitutionService(_mockFragmentSubstitutionRepository.Object);
            //_backgroundSubstitutionService = new BackgroundSubstitutionService(_mockBackgroundSubstitutionRepository.Object);
            //_backgroundService = new BackgroundService(_mockBackgroundRepository.Object);
            //_processEmissionParamService = new ProcessEmissionParamService(_mockProcessEmissionParamRepository.Object);
            //_flowPropertyEmissionService = new FlowPropertyEmissionService(_mockFlowPropertyEmissionRepository.Object);
            _processDissipationService = new ProcessDissipationService(_mockProcessDissipationRepository.Object);
            //_processDissipationParamService = new ProcessDissipationParamService(_mockProcessDissipationParamRepository.Object);
            _lciaService = new LCIAService(_mockLCIARepository.Object);
            //_characterizationParamService = new CharacterizationParamService(_mockCharacterizationParamRepository.Object);
            _unitOfWork = _mockUnitOfWork.Object;

            //methods that resource service facade is dependent on.
            _fragmentTraversalV2 = new FragmentTraversalV2(
                _fragmentFlowService,
                _nodeCacheService,
                _processFlowService,
                _flowFlowPropertyService);

            _lciaComputation = new LCIAComputationV2(_processFlowService,
                //_processEmissionParamService,
            _lciaMethodService,
            _flowService,
                //_flowFlowPropertyService,
                //_flowPropertyParamService,
                //_flowPropertyEmissionService,
            _processDissipationService,
                //_processDissipationParamService,
            _lciaService);
            //_characterizationParamService,
            //_paramService);

            _fragmentLCIAComputation = new FragmentLCIAComputation(_fragmentTraversalV2,
                _lciaComputation,
                _fragmentFlowService,
                _scoreCacheService,
                _nodeCacheService,
            //_fragmentNodeProcessService,
            //_processSubstitutionService,
            //_fragmentNodeFragmentService,
            //_fragmentSubstitutionService,
                _lciaMethodService,
                _fragmentService,
                _scenarioService,
                _processFlowService,
            _unitOfWork);

            _resourceServiceFacade = new ResourceServiceFacade(
                               _fragmentService,
                               _fragmentFlowService,
                               _fragmentStageService,
                               _fragmentLCIAComputation,
                               _flowService,
                               _flowPropertyService,
                               _flowTypeService,
                               _impactCategoryService,
                               _lciaComputation,
                               _lciaMethodService,
                               _processService,
                               _processFlowService,
                               _scenarioService,
                               _paramService,
                               _flowFlowPropertyService,
                               _lciaService,
                               _cacheManager);

            _docuService = new DocuService();
            _cacheManager = new CacheManager(
                _scenarioService,
                _unitOfWork,
                _fragmentService,
                _fragmentLCIAComputation,
                _nodeCacheService,
                _scoreCacheService,
                _scenarioGroupService);

            _resourceController = new ResourceController(_resourceServiceFacade, _scenarioService, _scenarioGroupService, _docuService, _paramService);
        }
Esempio n. 25
0
 public AssumptionDataController(IAssumptionDataService assumptionDataService, IScenarioService scenarioService, IAssumptionCategoryService assumptionCategoryService)
 {
     _assumptionDataService     = assumptionDataService;
     _scenarioService           = scenarioService;
     _assumptionCategoryService = assumptionCategoryService;
 }
Esempio n. 26
0
 public LoadScenarioService(IScenarioService scenarioService)
 {
     _scenarioService = scenarioService;
 }
 /// <summary>
 /// Constructs a <see cref="GetAllScenariosQueryHandler"/> instance.
 /// </summary>
 public GetAllScenariosQueryHandler(IScenarioService scenarioService)
 {
     _scenarioService = scenarioService;
 }
 /// <summary>
 /// Constructs a <see cref="DeleteScenarioCommandHandler"/> instance.
 /// </summary>
 public DeleteScenarioCommandHandler(IScenarioService scenarioService)
 {
     _scenarioService = scenarioService;
 }
Esempio n. 29
0
 public ScenarioController(IScenarioService service)
 {
     this.service = service;
 }
 /// <summary>
 /// Constructs a <see cref="ScenarioMaxHitCounterConditionChecker"/> instance.
 /// </summary>
 public ScenarioMaxHitCounterConditionChecker(IScenarioService scenarioService)
 {
     _scenarioService = scenarioService;
 }
 public ConditionController(IConditionService conditionService, IScenarioService scenarioService, IMapper mapper)
 {
     _conditionService = conditionService;
     _scenarioService  = scenarioService;
     _mapper           = mapper;
 }
Esempio n. 32
0
 public ScenarioController(IScenarioService scenarioService, IAuthorizationService authorizationService)
 {
     _scenarioService      = scenarioService;
     _authorizationService = authorizationService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TrialAddedEventHandler" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="scenarioService">The scenario service.</param>
 public TrialAddedEventHandler(ITrialAnalysisRepository repository, IScenarioService scenarioService, ILogger <TrialAddedEventHandler> logger)
 {
     this._repository      = repository;
     this._scenarioService = scenarioService;
     this._logger          = logger;
 }
Esempio n. 34
0
 public ScenarioController(IScenarioService scenarioService)
 {
     _scenarioService = scenarioService;
 }
 public ScenarioController(IScenarioService scenarioService, IMapper mapper)
 {
     _scenarioService = scenarioService;
     _mapper          = mapper;
 }
Esempio n. 36
0
 public ScenarioController(
     IScenarioService scenarioService)
 {
     _scenarioService            = scenarioService;
     ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
 }
Esempio n. 37
0
 public AssumptionDataController(IAssumptionDataService assumptionDataService, IScenarioService scenarioService, IAssumptionCategoryService assumptionCategoryService)
 {
     _assumptionDataService = assumptionDataService;
     _scenarioService = scenarioService;
     _assumptionCategoryService = assumptionCategoryService;
 }