Esempio n. 1
0
 public MachineWebSocketService(
     IMachineService machineService,
     IMapper mapper)
 {
     _machineService = machineService;
     _mapper         = mapper;
 }
Esempio n. 2
0
 public bool ValidCreateObject(CoreIdentificationDetail coreIdentificationDetail, ICoreIdentificationService _coreIdentificationService,
                               ICoreIdentificationDetailService _coreIdentificationDetailService, ICoreBuilderService _coreBuilderService,
                               IRollerTypeService _rollerTypeService, IMachineService _machineService)
 {
     VCreateObject(coreIdentificationDetail, _coreIdentificationService, _coreIdentificationDetailService, _coreBuilderService, _rollerTypeService, _machineService);
     return(isValid(coreIdentificationDetail));
 }
Esempio n. 3
0
 public Barring UpdateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService,
                             IContactService _contactService, IMachineService _machineService,
                             IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService)
 {
     return(barring = _validator.ValidUpdateObject(barring, _barringService, _uomService, _itemService, _itemTypeService, _contactService, _machineService) ?
                      _repository.UpdateObject(barring) : barring);
 }
Esempio n. 4
0
 public MachineController(
     IMachineService iMachineService,
     IEntityBaseRepository <Error> _errorsRepository, IUnitOfWork _unitOfWork)
     : base(_errorsRepository, _unitOfWork)
 {
     _iMachineService = iMachineService;
 }
Esempio n. 5
0
        public virtual async void TestDelete()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);
            var        client     = new ApiClient(testServer.CreateClient());

            client.SetBearerToken(JWTTestHelper.GenerateBearerToken());
            ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext;

            IMachineService service = testServer.Host.Services.GetService(typeof(IMachineService)) as IMachineService;
            var             model   = new ApiMachineServerRequestModel();

            model.SetProperties("B", "B", "B", Guid.Parse("3842cac4-b9a0-8223-0dcc-509a6f75849b"), "B");
            CreateResponse <ApiMachineServerResponseModel> createdResponse = await service.Create(model);

            createdResponse.Success.Should().BeTrue();

            ActionResponse deleteResult = await client.MachineDeleteAsync(2);

            deleteResult.Success.Should().BeTrue();
            ApiMachineServerResponseModel verifyResponse = await service.Get(2);

            verifyResponse.Should().BeNull();
        }
Esempio n. 6
0
 public AppApiController(
     IMessagesViewService messagesViewService,
     IPlantMessagesViewService plantMessagesViewService,
     IMachineViewService machineViewService,
     IContextService contextService,
     IMesViewService mesViewService,
     INotificationViewService notificationManagerViewService,
     IPanelParametersViewService panelParametersViewService,
     IEfficiencyViewService efficiencyViewService,
     IProductivityViewService productivityViewService,
     IJobsViewService jobsViewService,
     IMaintenanceViewService maintenanceViewService,
     IXToolsViewService xToolsViewService,
     IToolsViewService toolsViewService,
     IMachineService machineService)
 {
     _contextService                 = contextService;
     _plantMessagesViewService       = plantMessagesViewService;
     _machineViewService             = machineViewService;
     _mesViewService                 = mesViewService;
     _notificationManagerViewService = notificationManagerViewService;
     _panelParametersViewService     = panelParametersViewService;
     _messagesViewService            = messagesViewService;
     _efficiencyViewService          = efficiencyViewService;
     _productivityViewService        = productivityViewService;
     _jobsViewService                = jobsViewService;
     _maintenanceViewService         = maintenanceViewService;
     _xToolsViewService              = xToolsViewService;
     _toolsViewService               = toolsViewService;
     _machineService                 = machineService;
 }
Esempio n. 7
0
 public MachineStatusPageViewModel(INavigationService navigationService,
                                   IMachineService machineService)
     : base(navigationService)
 {
     Title = "Machine Status";
     this.machineService = machineService;
 }
 public MachinesController(IMapper mapper, MachineVisualizationDataContext dbContext,
                           IMachineService machineClient)
 {
     this.mapper        = mapper ?? throw new ArgumentNullException(nameof(mapper));
     this.dbContext     = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
     this.machineClient = machineClient;
 }
 public UserSettingApiController(IContextService contextService, IUserSettingViewService userSettingViewService, IUserManagerViewService userManagerViewService, IMachineService machineService)
 {
     _contextService         = contextService;
     _userSettingViewService = userSettingViewService;
     _userManagerViewService = userManagerViewService;
     _machineService         = machineService;
 }
 public PanelParametersViewService(IMachineService machineService,
                                   IParameterMachineService parameterMachineService, IToolService toolsService)
 {
     _machineService          = machineService;
     _parameterMachineService = parameterMachineService;
     _toolsService            = toolsService;
 }
Esempio n. 11
0
 public SpeakerController(
     ISpeakerService speakerService,
     IMachineService machineService)
 {
     _speakerService = speakerService;
     _machineService = machineService;
 }
Esempio n. 12
0
        public MachinesViewModel(IMachineService machineService, IOrderService orderService, IFilePickerService filePickerService, ICommonServices commonServices) : base(commonServices)
        {
            MachineService = machineService;

            MachineList    = new MachineListViewModel(MachineService, commonServices);
            MachineDetails = new MachineDetailsViewModel(MachineService, filePickerService, commonServices);
        }
Esempio n. 13
0
        public void Initalize()
        {
            _factory = new MockRepository(MockBehavior.Loose);
            _container = new AutoMockContainer(_factory);
            _coins = new List<Coin>();
            _purchaseServiceMock = _container.GetMock<IPurchaseService>();

            var product_a = new Product() { Price = 1, Title = "Apple" };
            var product_b = new Product() { Price = .75m, Title = "Banana" };

            var slot_a = new Slot() { Button = "A", Product = product_a, MaxNumberOfProduct = 5, Quantity = 4 };
            var slot_b = new Slot() { Button = "B", Product = product_b, MaxNumberOfProduct = 5, Quantity = 0 };

            _dollar = new Coin() { Title = "One Dollar", Value = 1, ShortName = "O" };
            _quarter = new Coin() { Title = "Quarter", Value = .25m, ShortName = "Q" };
            _dime = new Coin() { Title = "Dime", Value = .1m, ShortName = "d" };
            _nickle = new Coin() { Title = "Nickle", Value = .05m, ShortName = "n" };
            _penny = new Coin() { Title = "Penny", Value = .01m, ShortName = "p" };

            _slots = new List<Slot>() { slot_a, slot_b };

            _maxSlots = 5;

            _machineService = new MachineService(_maxSlots, _purchaseServiceMock.Object);
        }
 public ManagementController(IEconomicOperatorService economicOperatorService, IFacilityService facilityService, IMachineService machineService, IRequestService requestService)
 {
     _economicOperatorService = economicOperatorService;
     _facilityService         = facilityService;
     _machineService          = machineService;
     _requestService          = requestService;
 }
Esempio n. 15
0
 public bool ValidUpdateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService,
                               IContactService _contactService, IMachineService _machineService)
 {
     barring.Errors.Clear();
     VUpdateObject(barring, _barringService, _uomService, _itemService, _itemTypeService, _contactService, _machineService);
     return(isValid(barring));
 }
Esempio n. 16
0
 public ManageRule()
 {
     InitializeComponent();
     _applicationService = new ApplicationService();
     _machineService = new MachineService();
     _priorityService = new PriorityService();
     _ruleService = new RuleService();
 }
Esempio n. 17
0
 public AnaSayfa()
 {
     InitializeComponent();
     _machineService        = new MachineManager(new MysqlMachineDal());
     _categoryService       = new CategoryManager(new MysqlCategoryDal());
     _logService            = new LogManager(new MysqlLogDal());
     _workOrderStateService = new WorkOrderStateManager(new MysqlWorkOrderStateDal());
 }
Esempio n. 18
0
 public bool ValidUpdateObject(CoreIdentificationDetail coreIdentificationDetail, ICoreIdentificationService _coreIdentificationService,
                               ICoreIdentificationDetailService _coreIdentificationDetailService, ICoreBuilderService _coreBuilderService,
                               IRollerTypeService _rollerTypeService, IMachineService _machineService)
 {
     coreIdentificationDetail.Errors.Clear();
     VUpdateObject(coreIdentificationDetail, _coreIdentificationService, _coreIdentificationDetailService, _coreBuilderService, _rollerTypeService, _machineService);
     return(isValid(coreIdentificationDetail));
 }
Esempio n. 19
0
        public SignalRService(IMachineService machineService, IPowerShellService powerShellService)
        {
            _machineService    = machineService;
            _powerShellService = powerShellService;

            _connection = BuildConnection();
            RegisterEvents(_connection);
        }
Esempio n. 20
0
 public ContextService(IMachineService machineService, IMesService mesService, IAccountService accountService, IUserManagerService userManagerService, IAssistanceService assistanceService)
 {
     _machineService     = machineService;
     _mesService         = mesService;
     _accountService     = accountService;
     _userManagerService = userManagerService;
     _assistanceService  = assistanceService;
 }
Esempio n. 21
0
 public MstMachineController()
 {
     _MachineService                  = new MachineService(new MachineRepository(), new MachineValidator());
     _itemService                     = new ItemService(new ItemRepository(), new ItemValidator());
     _rollerBuilderService            = new RollerBuilderService(new RollerBuilderRepository(), new RollerBuilderValidator());
     _coreIdentificationDetailService = new CoreIdentificationDetailService(new CoreIdentificationDetailRepository(), new CoreIdentificationDetailValidator());
     _barringService                  = new BarringService(new BarringRepository(), new BarringValidator());
 }
Esempio n. 22
0
 public ToolsViewService(IMachineService machineService, IContextService contextService,
                         IToolService toolService, IParameterMachineService parameterMachineService)
 {
     _machineService          = machineService;
     _contextService          = contextService;
     _parameterMachineService = parameterMachineService;
     _toolService             = toolService;
 }
 public SendAlert(IWatchService watchService, IAlarmService alarmService, IMachineService machineService, IAlarmLogService alarmLogService, INotificationHubConnectionSettings hub)
 {
     _hub             = hub.Hub;
     _watchService    = watchService;
     _alarmService    = alarmService;
     _machineService  = machineService;
     _alarmLogService = alarmLogService;
 }
 public ProductivityViewService(IPieceService pieceService, IContextService contextService,
                                IBarService barService, IStateService stateService, IMachineService machineService)
 {
     _pieceService   = pieceService;
     _contextService = contextService;
     _barService     = barService;
     _stateService   = stateService;
     _machineService = machineService;
 }
 public MachineController(IMachineService machineService, ILogger logger, IRepository repository, IBranchService branchService, IBranchAdminService branchAdminService, IAspNetRoles aspNetRolesService, IEmailService emailService)
 {
     _machineService     = machineService;
     _logger             = logger;
     _repository         = repository;
     _branchService      = branchService;
     _branchAdminService = branchAdminService;
     _aspNetRolesService = aspNetRolesService;
     _emailService       = emailService;
 }
Esempio n. 26
0
        public Barring VHasMachine(Barring barring, IMachineService _machineService)
        {
            Machine machine = _machineService.GetObjectById(barring.MachineId);

            if (machine == null)
            {
                barring.Errors.Add("MachineId", "Tidak terasosiasi dengan mesin");
            }
            return(barring);
        }
        public RollerBuilder VHasMachine(RollerBuilder rollerBuilder, IMachineService _machineService)
        {
            Machine machine = _machineService.GetObjectById(rollerBuilder.MachineId);

            if (machine == null)
            {
                rollerBuilder.Errors.Add("MachineId", "Tidak terasosiasi dengan machine");
            }
            return(rollerBuilder);
        }
 public MessageRoutingSystemErrorService()
 {
     _ruleService = new RuleService();
     _poolService = new PoolService();
     _messagePoolService = new MessagePoolService();
     _messageService = new MessageService();
     _applicationService = new ApplicationService();
     _machineService = new MachineService();
     _priorityService = new PriorityService();
 }
Esempio n. 29
0
 public Machine VCreateObject(Machine machine, IMachineService _machineService)
 {
     VNameNotEmpty(machine);
     if (!isValid(machine))
     {
         return(machine);
     }
     VHasUniqueCode(machine, _machineService);
     return(machine);
 }
Esempio n. 30
0
        public Barring VCreateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService,
                                     IContactService _contactService, IMachineService _machineService)
        {
            // Item Validation

            VHasItemTypeAndIsLegacy(barring, _itemTypeService);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasUniqueSku(barring, _barringService);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasName(barring);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasCategory(barring);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasUoM(barring, _uomService);
            if (!isValid(barring))
            {
                return(barring);
            }
            VNonNegativeQuantity(barring);
            if (!isValid(barring))
            {
                return(barring);
            }

            // Bar Validation
            VHasBlanket(barring, _itemService);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasContact(barring, _contactService);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasMachine(barring, _machineService);
            if (!isValid(barring))
            {
                return(barring);
            }
            VHasMeasurement(barring);
            return(barring);
        }
Esempio n. 31
0
 public MstBarringController()
 {
     _itemTypeService      = new ItemTypeService(new ItemTypeRepository(), new ItemTypeValidator());
     _warehouseItemService = new WarehouseItemService(new WarehouseItemRepository(), new WarehouseItemValidator());
     _itemService          = new ItemService(new ItemRepository(), new ItemValidator());
     _uomService           = new UoMService(new UoMRepository(), new UoMValidator());
     _warehouseService     = new WarehouseService(new WarehouseRepository(), new WarehouseValidator());
     _machineService       = new MachineService(new MachineRepository(), new MachineValidator());
     _barringService       = new BarringService(new BarringRepository(), new BarringValidator());
     _contactService       = new ContactService(new ContactRepository(), new ContactValidator());
 }
 public MessageRoutingSystemErrorService(IRuleService ruleService, IPoolService poolService,
     IMessagePoolService messagePoolService, IMessageService messageService,
     IApplicationService applicationService, IMachineService machineService)
 {
     _ruleService = ruleService;
     _poolService = poolService;
     _messagePoolService = messagePoolService;
     _messageService = messageService;
     _applicationService = applicationService;
     _machineService = machineService;
 }
Esempio n. 33
0
 public Barring CreateObject(Barring barring, IBarringService _barringService, IUoMService _uomService, IItemService _itemService, IItemTypeService _itemTypeService,
                             IContactService _contactService, IMachineService _machineService,
                             IWarehouseItemService _warehouseItemService, IWarehouseService _warehouseService)
 {
     barring.Errors = new Dictionary <String, String>();
     if (_validator.ValidCreateObject(barring, _barringService, _uomService, _itemService, _itemTypeService, _contactService, _machineService))
     {
         barring = _repository.CreateObject(barring);
     }
     return(barring);
 }
Esempio n. 34
0
        public MainViewModel(IMachineService ms)
        {
            machineService = ms;

            album   = new AlbumModel();
            jukebox = machineService.JukeboxFill();

            FillListboxes();

            //ms.saveToFile(InfoInput.json);
        }
        public void Initialize()
        {
            MockUow = new Mock<IMessageRoutingSystemUow>();
            MockUow.Setup(x => x.Rules).Returns(MockRepoRule.Object);
            MockUow.Setup(x => x.Pools).Returns(MockRepoPool.Object);
            MockUow.Setup(x => x.Applications).Returns(MockRepoApplication.Object);
            MockUow.Setup(x => x.ApplicationGroups).Returns(MockRepoApplicationGroup.Object);
            MockUow.Setup(x => x.ApplicationGroupMaps).Returns(MockRepoApplicationGroupMap.Object);
            MockUow.Setup(x => x.Machines).Returns(MockRepoMachine.Object);
            MockUow.Setup(x => x.MachineGroups).Returns(MockRepoMachineGroup.Object);
            MockUow.Setup(x => x.MachineGroupMaps).Returns(MockRepoMachineGroupMap.Object);
            MockUow.Setup(x => x.MessagePools).Returns(MockRepoMessagePool.Object);
            MockUow.Setup(x => x.Messages).Returns(MockRepoMessage.Object);
            MockUow.Setup(x => x.Priorities).Returns(MockRepoPriority.Object);

            RuleService = new RuleService(MockUow.Object);
            PoolService = new PoolService(MockUow.Object);
            ApplicationService = new ApplicationService(MockUow.Object);
            MachineService = new MachineService(MockUow.Object);
            MessagePoolService = new MessagePoolService(MockUow.Object);
            MessageService = new MessageService(MockUow.Object);
            PriorityService = new PriorityService(MockUow.Object);
        }
 public MachineServiceTests()
 {
     _machineService = new MachineService();
     _uow = new MessageRoutingSystemUow();
 }
Esempio n. 37
0
 public HomeController(IMachineService machineService) : this(machineService, default(IVLanService)) { }
Esempio n. 38
0
 public HomeController(IMachineService machineService, IVLanService vLanService)
 {
     MachineService = machineService ?? new MachineService();
     VLanService = vLanService ?? new VLanService();
 }
 public ManageMachine()
 {
     InitializeComponent();
     _machineService = new MachineService();
 }