public AssignmentQuestionRepository(Angular2_AspDotNet.Data.UnitOfWork.UnitOfWork unitOfWork) : base(unitOfWork.Context)
        {
            this._unitOfWork = unitOfWork;

            this._IActionRepository = new ActionRepository(unitOfWork);
            this._IAssignmentQuestionOptionRepository = new AssignmentQuestionOptionRepository(unitOfWork);
        }
예제 #2
0
        /// <summary>
        /// 创建新活动
        /// </summary>
        /// <param name="startUrl"></param>
        /// <param name="method"></param>
        public void New(string projectName, string startUrl, DataMethod method)
        {
            this.ProjectName = projectName;
            //设置项目路径
            AppSettings.Instance.CurrentExecutePath = Path.Combine(AppSettings.Instance.LibraryPath, projectName);
            this.StartUrl   = startUrl;
            this.DataMethod = method;
            IActionRepository rep = Repository as IActionRepository;

            rep.New(projectName);
            if (!string.IsNullOrEmpty(StartUrl))
            {
                App.Invoke(() =>
                {
                    AppContext.Current.Browser.Navigate(StartUrl);
                }, true);
            }
            AddAction(new ActionNavigate()
            {
                URL = startUrl, AppContext = AppContext.Current
            });
            if (DataSourceChanged != null)
            {
                DataSourceChanged(MainActionModel);
            }
        }
예제 #3
0
 public ActionController(IActionRepository actionRepository, IZoneRepository zoneRepository, ICompanyRepository companyRepository, IInventorizationRepository inventorizationRepository)
 {
     _actionRepository          = actionRepository;
     _zoneRepository            = zoneRepository;
     _companyRepository         = companyRepository;
     _inventorizationRepository = inventorizationRepository;
 }
예제 #4
0
 public PhoneBookController(DataContext context, IMapper mapper, IActionRepository <Person> personRepository, IActionRepository <Department> departmentRepository)
 {
     _context              = context;
     _mapper               = mapper;
     _personRepository     = personRepository;
     _departmentRepository = departmentRepository;
 }
예제 #5
0
        public ConfigureActionViewModel(IDeviceRepository deviceRepository,
                                        IActionTypeRepository actionTypeRepository, IActionRepository actionRepository, IActionUpdater actionUpdater)
        {
            if (deviceRepository == null)
            {
                throw new ArgumentNullException(nameof(deviceRepository));
            }
            if (actionTypeRepository == null)
            {
                throw new ArgumentNullException(nameof(actionTypeRepository));
            }
            if (actionRepository == null)
            {
                throw new ArgumentNullException(nameof(actionRepository));
            }
            if (actionUpdater == null)
            {
                throw new ArgumentNullException(nameof(actionUpdater));
            }

            _deviceRepository     = deviceRepository;
            _actionTypeRepository = actionTypeRepository;
            _actionRepository     = actionRepository;
            _actionUpdater        = actionUpdater;

            ActionTriggers  = new ObservableCollection <ActionTrigger>();
            Devices         = new ObservableCollection <Device>();
            ActionTypes     = new ObservableCollection <ActionType>();
            ActionArguments = new ObservableCollection <ActionArgument>();
            SaveCommand     = new TransactionalCommandTask(Save, CanSave);

            MessengerInstance.Register <TasksUpdated>(this, t => ActionIdentifier = null);
        }
        public ActionDescriptionViewModel(ActionDescription actionDescription, IActionRepository actionRepository,
                                          IMessenger messenger)
        {
            if (actionDescription == null)
            {
                throw new ArgumentNullException(nameof(actionDescription));
            }
            if (messenger == null)
            {
                throw new ArgumentNullException(nameof(messenger));
            }

            _actionRepository = actionRepository;
            _messenger        = messenger;

            ActionArgumentIdentifier = actionDescription.ActionArgumentIdentifier;
            ActionIdentifier         = actionDescription.ActionIdentifier;
            ActionTrigger            = actionDescription.ActionTrigger;
            ActionTypeIdentifier     = actionDescription.ActionTypeIdentifier;
            DeviceIdentifier         = actionDescription.DeviceIdentifier;
            DeviceName = actionDescription.DeviceName;
            Result     = actionDescription.Result;

            DeleteTaskCommand = new TransactionalCommandTask(DeleteTask);
        }
예제 #7
0
        public TasksViewModel(IActionRepository actionRepository)
        {
            if (actionRepository == null)
            {
                throw new ArgumentNullException(nameof(actionRepository));
            }

            _actionRepository = actionRepository;

            if (IsInDesignMode)
            {
                Actions = new ObservableCollection <ActionDescriptionViewModel>(new List <ActionDescriptionViewModel>
                {
                    new ActionDescriptionViewModel(new ActionDescription {
                        DeviceName = "TV", Result = "switch on", ActionTrigger = ActionTrigger.Home
                    }, _actionRepository, MessengerInstance),
                    new ActionDescriptionViewModel(new ActionDescription  {
                        DeviceName = "Heating", Result = "21°C", ActionTrigger = ActionTrigger.Home
                    }, _actionRepository, MessengerInstance),
                    new ActionDescriptionViewModel(new ActionDescription  {
                        DeviceName = "Coffeemaker", Result = "switch on", ActionTrigger = ActionTrigger.Away
                    }, _actionRepository, MessengerInstance),
                });
            }
            else
            {
                Actions = new ObservableCollection <ActionDescriptionViewModel>();
            }

            MessengerInstance.Register <TasksUpdated>(this, async t => await LoadViewModel());
        }
예제 #8
0
 public LeaveActionController(IActionRepository repo, IConfiguration config, ILogger <LogController> log, IMapper mapper)
 {
     this._repo   = repo;
     this._config = config;
     _log         = log;
     this._mapper = mapper;
 }
 private void EnsureRepository()
 {
     if (this.actionRepository == null || this.actionRepository.Identifier != controller.Identifier)
     {
         this.actionRepository = this.actionRepositoryProvider.Get(controller.GameName, controller.CategoryName);
     }
 }
예제 #10
0
 public SelectionActionPageViewModel(INavigationService navigationService, IPatientRepository patientRepository, IActionRepository actionRepository) :
     base(navigationService)
 {
     this.navigationService = navigationService;
     this.patientRepository = patientRepository;
     this.actionRepository  = actionRepository;
 }
        public static void ActionsInitialize(IActionRepository actionRepository, ITaskRepository repository)
        {
            var result = actionRepository.GetAll();

            if (result != null && result.Count() != 0)
            {
                foreach (var bllAction in result)
                {
                    BllTask task = repository.GetById(bllAction.TaskId);

                    switch ((BllActionEnum)bllAction.ActionId)
                    {
                    case BllActionEnum.Add:
                        AddWork(new AddTask(task, repository, bllAction.Id, actionRepository), task.UserId);
                        break;

                    case BllActionEnum.Delete:
                        AddWork(new DeleteTask(task.Id, repository, bllAction.Id, actionRepository), task.UserId);
                        break;

                    case BllActionEnum.Update:
                        AddWork(new UpdateTask(task.Id, repository, bllAction.Id, actionRepository), task.UserId);
                        break;

                    default:
                        throw new InvalidEnumArgumentException();
                    }
                }
            }
        }
        public OrderItemCreateValidator(IDatabaseConnectionFactory databaseConnectionFactory)
        {
            this.productRepository         = RepositoryFactory.CreateProductRepository();
            this.actionRepository          = RepositoryFactory.CreateActionRepository();
            this.databaseConnectionFactory = databaseConnectionFactory;

            RuleFor(oi => oi.ProductId)
            .Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty()
            .Must(ValidateProductId)
            .WithMessage("The product specified doesn't exist in the database");

            RuleFor(oi => oi.ActionId)
            .Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty()
            .Must(ValidateActionId)
            .WithMessage("The action specified doesn't exist in the database");

            RuleFor(oi => oi.Amount)
            .Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty()
            .Must(ValidateAmount)
            .WithMessage("Amount cannot be negative");

            RuleFor(oi => oi.DiscountBasic)
            .Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty()
            .Must(ValidateDiscount)
            .WithMessage("Discount is invalid");
        }
예제 #13
0
 private FormUtil(IActionRepository Actionrepository, IAlbumRepository Albumrepository, IPersonneRepository Personnerepository)
 {
     InitializeComponent();
     _actionrepo = Actionrepository;
     _albrepo    = Albumrepository;
     _persrepo   = Personnerepository;
 }
        //private IJabatanRepository jabatanRepo;

        public DashboardController()
        {
            this.roleService       = new RoleService(Roles.Provider);
            this.membershipService = new MembershipService(Membership.Provider);
            this.actionRepo        = new EFActionRepository();
            this.moduleRepo        = new EFModuleRepository();
            //this.jabatanRepo = new EFJabatanRepository();
        }
예제 #15
0
 public FileController(IFileRepository fileRepository,
                       IActionRepository actionRepository,
                       IEmailRepository emailRepository)
 {
     this.fileRepository   = fileRepository;
     this.actionRepository = actionRepository;
     this.emailRepository  = emailRepository;
 }
예제 #16
0
 public RoleController(IModuleRepository repoParam, IActionRepository repoActionParam, IRoleRepository repoRole, IModulesInRoleRepository repoModulesInRole)
 {
     this.roleService = new RoleService(Roles.Provider);
     this.moduleRepo = repoParam;
     this.actionRepo = repoActionParam;
     this.roleRepo = repoRole;
     this.repoModulesInRole = repoModulesInRole;
 }
예제 #17
0
 public ReportController(ICompanyRepository companyRepository
                         , IInventorizationRepository inventorizationRepository
                         , IActionRepository actionRepository)
 {
     this.companyRepository         = companyRepository;
     this.actionRepository          = actionRepository;
     this.inventorizationRepository = inventorizationRepository;
 }
 public EditListInternsPageViewModel(INavigationService navigationService, IActionRepository actionRepository, IInternRepository internRepository) :
     base(navigationService)
 {
     this.navigationService = navigationService;
     this.actionRepository  = actionRepository;
     this.internRepository  = internRepository;
     Title = "Editar Estagiários";
 }
예제 #19
0
 public ActionController(IActionRepository actionRepository, IProjetRepository projetRepository, IAutorisationRepository autorisationRepository, IMapper mapper, IAuthorizationService authorizationService)
 {
     _actionRepository       = actionRepository;
     _projetRepository       = projetRepository;
     _autorisationRepository = autorisationRepository;
     _mapper = mapper;
     _authorizationService = authorizationService;
 }
 public ListActionAdminPageViewModel(INavigationService navigationService, ILineRepository lineRepository, IActionRepository actionRepository) :
     base(navigationService)
 {
     this.navigationService = navigationService;
     this.lineRepository    = lineRepository;
     this.actionRepository  = actionRepository;
     Title = "My View A";
 }
예제 #21
0
 public StatisticsController(IStatisticsRepository statisticsRepository,
                             IActionRepository actionRepository,
                             IEmailRepository emailRepository)
 {
     this.statisticsRepository = statisticsRepository;
     this.actionRepository     = actionRepository;
     this.emailRepository      = emailRepository;
 }
 public ListActionResponsiblePageViewModel(INavigationService navigationService, IActionRepository actionRepository, ILineRepository lineRepository) :
     base(navigationService)
 {
     this.navigationService = navigationService;
     this.actionRepository  = actionRepository;
     this.lineRepository    = lineRepository;
     Line = new Line();
 }
예제 #23
0
 public EditListResponsiblePageViewModel(INavigationService navigationService, IActionRepository actionRepository, IResponsibleRepository responsibleRepository) :
     base(navigationService)
 {
     this.navigationService     = navigationService;
     this.actionRepository      = actionRepository;
     this.responsibleRepository = responsibleRepository;
     Title = "Editar Responsáveis";
 }
 public ListPatientsResponsiblePageViewModel(INavigationService navigationService, IResponsibleRepository responsibleRepository, IActionRepository actionRepository, IPatientRepository patientRepository) :
     base(navigationService)
 {
     this.navigationService     = navigationService;
     this.responsibleRepository = responsibleRepository;
     this.actionRepository      = actionRepository;
     this.patientRepository     = patientRepository;
 }
예제 #25
0
 //private IJabatanRepository jabatanRepo;
 public DashboardController()
 {
     this.roleService = new RoleService(Roles.Provider);
     this.membershipService = new MembershipService(Membership.Provider);
     this.actionRepo = new EFActionRepository();
     this.moduleRepo = new EFModuleRepository();
     //this.jabatanRepo = new EFJabatanRepository();
 }
예제 #26
0
 public RoleController(IModuleRepository repoParam, IActionRepository repoActionParam, IRoleRepository repoRole, IModulesInRoleRepository repoModulesInRole)
 {
     this.roleService       = new RoleService(Roles.Provider);
     this.moduleRepo        = repoParam;
     this.actionRepo        = repoActionParam;
     this.roleRepo          = repoRole;
     this.repoModulesInRole = repoModulesInRole;
 }
예제 #27
0
 public ActionWorker(IActionRepository actionRepository,
                     IFileRepository fileRepository,
                     string ip)
 {
     this.actionRepository = actionRepository;
     this.fileRepository   = fileRepository;
     this.ip     = ip;
     this.action = new action_view_model();
 }
예제 #28
0
 public RegisterLinePageViewModel(INavigationService navigationService, ILineRepository lineRepository, IActionRepository actionRepository)
     : base(navigationService)
 {
     this.navigationService = navigationService;
     this.lineRepository    = lineRepository;
     this.actionRepository  = actionRepository;
     Line  = new Line();
     Title = titlePage;
 }
예제 #29
0
 public ActionInserter(IActionFactoryRegistry actionFactoryRegistry, IActionRepository actionRepository,
                       ICooldownRegistry cooldownRegistry, ILogger logger, IClock clock)
 {
     _actionFactoryRegistry = actionFactoryRegistry;
     _actionRepository      = actionRepository;
     _cooldownRegistry      = cooldownRegistry;
     _logger = logger;
     _clock  = clock;
 }
예제 #30
0
 public MenuPermissionService(IActionRepository actionRepository, IMenuRepository menuRepository,
     IActionRoleRepository actionRoleRepository, IMenuRoleRepository menuRoleRepository, IMenuDomainService menuDomainService)
 {
     _actionRepository = actionRepository;
     _menuRepository = menuRepository;
     _actionRoleRepository = actionRoleRepository;
     _menuRoleRepository = menuRoleRepository;
     _menuDomainService = menuDomainService;
 }
예제 #31
0
        public static IActionRepository <T> GetActionRepository(string dbName, string productName, string userId)
        {
            IActionRepository <T> repo = null;

            //We only have 1 repository at this time, just return it
            repo        = new MongoActionRepository <T>(dbName) as IActionRepository <T>;
            repo.UserId = userId;
            return(repo);
        }
 public SelectionResponsibleInterconsultationtionPageViewModel(INavigationService navigationService, IPatientRepository patientRepository, IActionRepository actionRepository, IMessageRepository messageRepository, IResponsibleRepository responsibleRepository) :
     base(navigationService)
 {
     this.navigationService     = navigationService;
     this.patientRepository     = patientRepository;
     this.actionRepository      = actionRepository;
     this.messageRepository     = messageRepository;
     this.responsibleRepository = responsibleRepository;
 }
예제 #33
0
 public MenuPermissionService(IActionRepository actionRepository, IMenuRepository menuRepository,
                              IActionRoleRepository actionRoleRepository, IMenuRoleRepository menuRoleRepository, IMenuDomainService menuDomainService)
 {
     _actionRepository     = actionRepository;
     _menuRepository       = menuRepository;
     _actionRoleRepository = actionRoleRepository;
     _menuRoleRepository   = menuRoleRepository;
     _menuDomainService    = menuDomainService;
 }
예제 #34
0
        public EventsController(
      IEventRepository eventRepository, IActionRepository actionRepository, ILocationRepository locationRepository)
        {
            Contract.Requires<ArgumentNullException>(eventRepository != null, "eventRepository");
              Contract.Requires<ArgumentNullException>(actionRepository != null, "actionRepository");
              Contract.Requires<ArgumentNullException>(locationRepository != null, "locationRepository");

              _eventRepository = eventRepository;
              _actionRepository = actionRepository;
              _locationRepository = locationRepository;
        }
 public FirstTimeUserExperienceTracker(IApplicationRepository applicationRepository, ILocationRepository locationRepository,
     IDeviceRepository deviceRepository, ICredentialsRepository credentialsRepository, IActionRepository actionRepository, 
     IIftttConnector iftttConnector)
 {
     _applicationRepository = applicationRepository;
     _locationRepository = locationRepository;
     _deviceRepository = deviceRepository;
     _credentialsRepository = credentialsRepository;
     _actionRepository = actionRepository;
     _iftttConnector = iftttConnector;
 }
예제 #36
0
        public MainViewModel(IApplicationRepository applicationRepository, IFunctionalityToggler functionalityToggler, ILogRepository logRepository,
            ILocationRepository locationRepository, IDeviceRepository deviceRepository, ICredentialsRepository credentialsRepository,
            IFirstTimeUserExperienceTracker firstTimeUserExperienceTracker, IActionRepository actionRepository)
        {
            if (applicationRepository == null) throw new ArgumentNullException(nameof(applicationRepository));
            if (functionalityToggler == null) throw new ArgumentNullException(nameof(functionalityToggler));
            if (logRepository == null) throw new ArgumentNullException(nameof(logRepository));
            if (locationRepository == null) throw new ArgumentNullException(nameof(locationRepository));
            if (deviceRepository == null) throw new ArgumentNullException(nameof(deviceRepository));
            if (actionRepository == null) throw new ArgumentNullException(nameof(actionRepository));
            if (credentialsRepository == null) throw new ArgumentNullException(nameof(credentialsRepository));
            if (firstTimeUserExperienceTracker == null) throw new ArgumentNullException(nameof(firstTimeUserExperienceTracker));

            _applicationRepository = applicationRepository;
            _functionalityToggler = functionalityToggler;
            _logRepository = logRepository;
            _locationRepository = locationRepository;
            _deviceRepository = deviceRepository;
            _actionRepository = actionRepository;
            _credentialsRepository = credentialsRepository;
            _firstTimeUserExperienceTracker = firstTimeUserExperienceTracker;

            if (IsInDesignMode)
            {
                IsFirstTimeUserExperience = false;

                Activities = new ObservableCollection<ActivityViewModel>
                {
                    new ActivityViewModel(DateTimeOffset.UtcNow, "Home")
                    {
                        Actions = new List<string> { "switch on Desk lamp", $"Failed to control IFTTT{Environment.NewLine}This is what happened: (NotFound Not Found..." }
                    },
                    new ActivityViewModel(DateTimeOffset.UtcNow.AddDays(-1), "Away")
                    {
                        Actions = new List<string> { "switch off TV", "set to 16°C heating" }
                    },
                    new ActivityViewModel(DateTimeOffset.UtcNow.AddDays(-10), "Home")
                    {
                        Actions = new List<string> { "switch on TV", "set to 16°C heating" }
                    }
                };

                IsFirstTimeUserExperienceHomeStep = true;
            }
            else
            {
                Activities = new ObservableCollection<ActivityViewModel>();
            }

            UpdateFirstTimeUserExperienceCommand = new TransactionalCommandTask(UpdateFirstTimeUserExperience);
            NavigateToSettingsCommand = new RelayCommand(NavigateToSettings);
        }
예제 #37
0
 public ActionService(IActionRepository actionRepository, IUserForAuditingRepository userRepository,
                      IEmployeeRepository employeeRepository, ISiteRepository siteRepository,
                      ITaskCategoryRepository taskCategoryRepository, IPeninsulaLog log, IBus bus, ITasksRepository tasksRepository, IDocumentParameterHelper documentParameterHelper)
 {
     _actionRepository = actionRepository;
     _userForAuditingRepository = userRepository;
     _employeeRepository = employeeRepository;
     _siteRepository = siteRepository;
     _taskCategoryRepository = taskCategoryRepository;
     _log = log;
     _bus = bus;
     _tasksRepository = tasksRepository;
     _documentParameterHelper = documentParameterHelper;
 }
 public PackageLookup(ICustomerRepository customerRepository, 
                      IActionRepository actionRepository, 
                      IUserPackageRepository userPackageRepository,
                      IRolePackageRepository rolePackageRepository,
                      IGroupPackageRepository groupPackageRepository,
                      IContractRepository contractRepository,
                      IContractPackageRepository contractPackageRepository)
 {
     _customerRepository = customerRepository;
     _actionRepository = actionRepository;
     _userPackageRepository = userPackageRepository;
     _rolePackageRepository = rolePackageRepository;
     _groupPackageRepository = groupPackageRepository;
     _contractRepository = contractRepository;
     _contractPackageRepository = contractPackageRepository;
 }
예제 #39
0
 public ActionTaskService(   IActionTaskRepository actionTaskRepository, 
                             IDocumentParameterHelper documentParameterHelper,
                             IUserForAuditingRepository userForAuditingRepository, 
                             IUserRepository userRepository,
                             IBus bus, 
                             IPeninsulaLog log, 
                             IActionRepository actionRepository)
 {
     _actionTaskRepository = actionTaskRepository;
     _documentParameterHelper = documentParameterHelper;
     _userForAuditingRepository = userForAuditingRepository;
     _userRepository = userRepository;
     _bus = bus;
     _log = log;
     _actionRepository = actionRepository;
 }
예제 #40
0
        public ActionExecutor(ILocationRepository locationRepository, IActionRepository actionRepository, ILogger logger,
            ICredentialsRepository credentialsRepository, IFifthplayRepository fifthplayRepository,
            IIftttRepository iftttRepository)
        {
            if (locationRepository == null) throw new ArgumentNullException(nameof(locationRepository));
            if (actionRepository == null) throw new ArgumentNullException(nameof(actionRepository));
            if (logger == null) throw new ArgumentNullException(nameof(logger));
            if (credentialsRepository == null) throw new ArgumentNullException(nameof(credentialsRepository));
            if (fifthplayRepository == null) throw new ArgumentNullException(nameof(fifthplayRepository));
            if (iftttRepository == null) throw new ArgumentNullException(nameof(iftttRepository));

            _locationRepository = locationRepository;
            _actionRepository = actionRepository;
            _logger = logger;
            _credentialsRepository = credentialsRepository;
            _fifthplayRepository = fifthplayRepository;
            _iftttRepository = iftttRepository;
        }
        public ActionDescriptionViewModel(ActionDescription actionDescription, IActionRepository actionRepository,
            IMessenger messenger)
        {
            if (actionDescription == null) throw new ArgumentNullException(nameof(actionDescription));
            if (messenger == null) throw new ArgumentNullException(nameof(messenger));

            _actionRepository = actionRepository;
            _messenger = messenger;

            ActionArgumentIdentifier = actionDescription.ActionArgumentIdentifier;
            ActionIdentifier = actionDescription.ActionIdentifier;
            ActionTrigger = actionDescription.ActionTrigger;
            ActionTypeIdentifier = actionDescription.ActionTypeIdentifier;
            DeviceIdentifier = actionDescription.DeviceIdentifier;
            DeviceName = actionDescription.DeviceName;
            Result = actionDescription.Result;

            DeleteTaskCommand = new TransactionalCommandTask(DeleteTask);
        }
        public ConfigureActionViewModel(IDeviceRepository deviceRepository, 
            IActionTypeRepository actionTypeRepository, IActionRepository actionRepository, IActionUpdater actionUpdater)
        {
            if (deviceRepository == null) throw new ArgumentNullException(nameof(deviceRepository));
            if (actionTypeRepository == null) throw new ArgumentNullException(nameof(actionTypeRepository));
            if (actionRepository == null) throw new ArgumentNullException(nameof(actionRepository));
            if (actionUpdater == null) throw new ArgumentNullException(nameof(actionUpdater));

            _deviceRepository = deviceRepository;
            _actionTypeRepository = actionTypeRepository;
            _actionRepository = actionRepository;
            _actionUpdater = actionUpdater;

            ActionTriggers = new ObservableCollection<ActionTrigger>();
            Devices = new ObservableCollection<Device>();
            ActionTypes = new ObservableCollection<ActionType>();
            ActionArguments = new ObservableCollection<ActionArgument>();
            SaveCommand = new TransactionalCommandTask(Save, CanSave);

            MessengerInstance.Register<TasksUpdated>(this, t => ActionIdentifier = null);
        }
예제 #43
0
        public TasksViewModel(IActionRepository actionRepository)
        {
            if (actionRepository == null) throw new ArgumentNullException(nameof(actionRepository));

            _actionRepository = actionRepository;

            if (IsInDesignMode)
            {
                Actions = new ObservableCollection<ActionDescriptionViewModel>(new List<ActionDescriptionViewModel>
                {
                    new ActionDescriptionViewModel(new ActionDescription { DeviceName = "TV", Result = "switch on", ActionTrigger = ActionTrigger.Home }, _actionRepository, MessengerInstance),
                    new ActionDescriptionViewModel(new ActionDescription  { DeviceName = "Heating", Result = "21°C", ActionTrigger = ActionTrigger.Home }, _actionRepository, MessengerInstance),
                    new ActionDescriptionViewModel(new ActionDescription  { DeviceName = "Coffeemaker", Result = "switch on", ActionTrigger = ActionTrigger.Away }, _actionRepository, MessengerInstance),
                });
            }
            else
            {
                Actions = new ObservableCollection<ActionDescriptionViewModel>();
            }

            MessengerInstance.Register<TasksUpdated>(this, async t => await LoadViewModel());
        }
 public ActionLogicTest()
 {
     _actionRepository = new ActionRepository(new HttpMessageHandlerStub());
     actionLogic = new ActionLogic(_actionRepository);
 }
예제 #45
0
 public ModuleController(IModuleRepository repoParam, IActionRepository repoActionParam, IModulesInRoleRepository repoModulesInRole)
 {
     this.moduleRepo = repoParam;
     this.actionRepo = repoActionParam;
     this.modulesInRoleRepo = repoModulesInRole;
 }
 public ActionLogic(IActionRepository actionRepository)
 {
     _actionRepository = actionRepository;
 }
예제 #47
0
        public ActionUpdater(IActionRepository actionRepository)
        {
            if (actionRepository == null) throw new ArgumentNullException(nameof(actionRepository));

            _actionRepository = actionRepository;
        }
예제 #48
0
 //private readonly static ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
 public ActionService( IUnitOfWork unitwork, IActionRepository actionRepository, IActionChannelRepository actionChannelRepository )
 {
     this.unitwork = unitwork;
     this.actionRepository = actionRepository;
     this.actionChannelRepository = actionChannelRepository;
 }
예제 #49
0
 public ActionService(IActionRepository actionRepository)
 {
     // this wont get initialized from the Mvx IoC
     // so we do it here
     _actionRepository = actionRepository;
 }
예제 #50
0
 public ActionController(IActionRepository repoParam)
 {
     this.actionRepo = repoParam;
 }
 public QAQCDataAPIController(IActionRepository actionRepository, IRepository<CV_RelationshipType> relationTypeRepository, IWQDefaultValueProvider wqDefaultValueProvider)
 {
     _actionRepository = actionRepository;
     _relatedActionTypeRepository = relationTypeRepository;
     _wqDefaultValueProvider = wqDefaultValueProvider;
 }
예제 #52
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationTablePreAction" /> class.
 /// </summary>
 /// <param name="actionRepository">The action repository.</param>
 /// <param name="tokenManager">The token manager.</param>
 public ValidationTablePreAction(IActionRepository actionRepository, ITokenManager tokenManager)
 {
     this.actionRepository = actionRepository;
     this.tokenManager = tokenManager;
 }