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

            this._IActionRepository = new ActionRepository(unitOfWork);
            this._IAssignmentQuestionOptionRepository = new AssignmentQuestionOptionRepository(unitOfWork);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
 public ActionController(IActionRepository actionRepository, IZoneRepository zoneRepository, ICompanyRepository companyRepository, IInventorizationRepository inventorizationRepository)
 {
     _actionRepository          = actionRepository;
     _zoneRepository            = zoneRepository;
     _companyRepository         = companyRepository;
     _inventorizationRepository = inventorizationRepository;
 }
Ejemplo n.º 4
0
 public PhoneBookController(DataContext context, IMapper mapper, IActionRepository <Person> personRepository, IActionRepository <Department> departmentRepository)
 {
     _context              = context;
     _mapper               = mapper;
     _personRepository     = personRepository;
     _departmentRepository = departmentRepository;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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");
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 15
0
 public FileController(IFileRepository fileRepository,
                       IActionRepository actionRepository,
                       IEmailRepository emailRepository)
 {
     this.fileRepository   = fileRepository;
     this.actionRepository = actionRepository;
     this.emailRepository  = emailRepository;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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";
 }
Ejemplo n.º 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";
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 29
0
 public ActionInserter(IActionFactoryRegistry actionFactoryRegistry, IActionRepository actionRepository,
                       ICooldownRegistry cooldownRegistry, ILogger logger, IClock clock)
 {
     _actionFactoryRegistry = actionFactoryRegistry;
     _actionRepository      = actionRepository;
     _cooldownRegistry      = cooldownRegistry;
     _logger = logger;
     _clock  = clock;
 }
Ejemplo n.º 30
0
 public MenuPermissionService(IActionRepository actionRepository, IMenuRepository menuRepository,
     IActionRoleRepository actionRoleRepository, IMenuRoleRepository menuRoleRepository, IMenuDomainService menuDomainService)
 {
     _actionRepository = actionRepository;
     _menuRepository = menuRepository;
     _actionRoleRepository = actionRoleRepository;
     _menuRoleRepository = menuRoleRepository;
     _menuDomainService = menuDomainService;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 33
0
 public MenuPermissionService(IActionRepository actionRepository, IMenuRepository menuRepository,
                              IActionRoleRepository actionRoleRepository, IMenuRoleRepository menuRoleRepository, IMenuDomainService menuDomainService)
 {
     _actionRepository     = actionRepository;
     _menuRepository       = menuRepository;
     _actionRoleRepository = actionRoleRepository;
     _menuRoleRepository   = menuRoleRepository;
     _menuDomainService    = menuDomainService;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 47
0
        public ActionUpdater(IActionRepository actionRepository)
        {
            if (actionRepository == null) throw new ArgumentNullException(nameof(actionRepository));

            _actionRepository = actionRepository;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 49
0
 public ActionService(IActionRepository actionRepository)
 {
     // this wont get initialized from the Mvx IoC
     // so we do it here
     _actionRepository = actionRepository;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }