public GCodeController(ILoadOptionsManager loadOptionsManager, IUserFileManager fileManager, GCodeLoadHelper loadHelper, ICNCLibUserContext userContext) { _loadOptionsManager = loadOptionsManager; _fileManager = fileManager; _loadHelper = loadHelper; _userContext = userContext; }
public ItemManager(IUnitOfWork unitOfWork, IItemRepository repository, ICNCLibUserContext userContext, IMapper mapper) : base(unitOfWork, repository, mapper) { _unitOfWork = unitOfWork ?? throw new ArgumentNullException(); _repository = repository ?? throw new ArgumentNullException(); _userContext = userContext ?? throw new ArgumentNullException(); _mapper = mapper ?? throw new ArgumentNullException(); }
public ItemManager(IUnitOfWork unitOfWork, IItemRepository repository, ICNCLibUserContext userContext, IMapper mapper) : base(unitOfWork, repository, mapper) { _unitOfWork = unitOfWork; _repository = repository; _userContext = userContext; _mapper = mapper; }
public UserManager(IUnitOfWork unitOfWork, IUserRepository repository, IMachineRepository machineRepository, IItemRepository itemRepository, IUserFileRepository userFileRepository, IConfigurationRepository configRepository, IInitRepository initRepository, ICNCLibUserContext userContext, ICurrentDateTime currentDate, IMapper mapper, IOneWayPasswordProvider passwordProvider, CallStatisticCache callStatisticCache) : base(unitOfWork, repository, mapper) { _unitOfWork = unitOfWork; _repository = repository; _machineRepository = machineRepository; _itemRepository = itemRepository; _configRepository = configRepository; _userFileRepository = userFileRepository; _initRepository = initRepository; _userContext = userContext; _currentDate = currentDate; _mapper = mapper; _passwordProvider = passwordProvider; _callStatisticCache = callStatisticCache; }
public UserFileManager(IUnitOfWork unitOfWork, IUserFileRepository repository, ICNCLibUserContext userContext, IMapper mapper, ICurrentDateTime currentDateTime) : base(unitOfWork, repository, mapper) { _unitOfWork = unitOfWork; _repository = repository; _userContext = userContext; _mapper = mapper; _currentDateTime = currentDateTime; }
public MachineManager(IUnitOfWork unitOfWork, IMachineRepository repository, IConfigurationRepository repositoryConfig, ICNCLibUserContext userContext, IMapper mapper) : base(unitOfWork, repository, mapper) { _unitOfWork = unitOfWork; _repository = repository; _repositoryConfig = repositoryConfig; _userContext = userContext; _mapper = mapper; }
public MachineManager(IUnitOfWork unitOfWork, IMachineRepository repository, IConfigurationRepository repositoryConfig, ICNCLibUserContext userContext, IMapper mapper) : base(unitOfWork, repository, mapper) { _unitOfWork = unitOfWork ?? throw new ArgumentNullException(); _repository = repository ?? throw new ArgumentNullException(); _repositoryConfig = repositoryConfig ?? throw new ArgumentNullException(); _userContext = userContext ?? throw new ArgumentNullException(); _mapper = mapper ?? throw new ArgumentNullException(); }
public SetupWindowViewModel(IFactory <IMachineService> machineService, IFactory <IJoystickService> joystickService, IMapper mapper, Global global, ICNCLibUserContext userContext) { _machineService = machineService; _joystickService = joystickService; _mapper = mapper; _global = global; _userContext = userContext; ResetOnConnect = false; }
public EepromConfigurationController(IEepromConfigurationManager eepromConfigurationManager, ICNCLibUserContext userContext) { _eepromConfigurationManager = eepromConfigurationManager; _userContext = userContext; }
public CambamController(ILoadOptionsManager loadOptionsManager, GCodeLoadHelper loadHelper, ICNCLibUserContext userContext) { _loadOptionsManager = loadOptionsManager; _loadHelper = loadHelper; _userContext = userContext; }
private void AppStartup(object sender, StartupEventArgs e) { var userContextRW = new CNCLibUserContext(); ICNCLibUserContext userContext = userContextRW; var localizationCollector = new LocalizationCollector(); var moduleInit = new InitializationManager(); moduleInit.Add(new Framework.Tools.ModuleInitializer()); moduleInit.Add(new Framework.Arduino.SerialCommunication.ModuleInitializer()); moduleInit.Add(new Framework.Logic.ModuleInitializer() { MapperConfiguration = new MapperConfiguration( cfg => { cfg.AddProfile <WpfAutoMapperProfile>(); cfg.AddProfile <GCodeGUIAutoMapperProfile>(); }) }); moduleInit.Add(new CNCLib.Logic.Client.ModuleInitializer()); moduleInit.Add(new CNCLib.WpfClient.ModuleInitializer()); moduleInit.Add(new CNCLib.Service.WebAPI.ModuleInitializer() { ConfigureHttpClient = httpClient => { HttpClientHelper.PrepareHttpClient(httpClient, @"https://cnclib.azurewebsites.net"); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue( "Basic", Base64Helper.StringToBase64($"{userContextRW.UserName}:{userContextRW.Password}")); } }); GlobalDiagnosticsContext.Set("logDir", $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}/CNCLib.Web/logs"); _logger.Info(@"Starting ..."); FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag))); AppService.ServiceCollection = new ServiceCollection(); AppService.ServiceCollection .AddTransient <ILoggerFactory, LoggerFactory>() .AddTransient(typeof(ILogger <>), typeof(Logger <>)) .AddSingleton(userContext); moduleInit.Initialize(AppService.ServiceCollection, localizationCollector); AppService.BuildServiceProvider(); // Open WebAPI Connection // bool ok = Task.Run( async() => { try { await userContextRW.InitUserContext(userContextRW.UserName); using (var scope = AppService.ServiceProvider.CreateScope()) { var controller = scope.ServiceProvider.GetRequiredService <IMachineService>(); var m = await controller.Get(1000000); return(true); } } catch (Exception ex) { MessageBox.Show($"Cannot connect to WebAPI: {ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error); Current.Shutdown(); return(false); } }).ConfigureAwait(true).GetAwaiter().GetResult(); }
public JoystickController(IJoystickManager manager, ICNCLibUserContext userContext) { _manager = manager; _userContext = userContext; }
public ConfigurationRepository(CNCLibContext dbContext, ICNCLibUserContext userContext) : base(dbContext) { _userContext = userContext ?? throw new ArgumentNullException(); }
public SetUserContextFilter(ICNCLibUserContext userContext) { _userContext = userContext; }
public GCodeController(ILoadOptionsManager loadOptionsManager, ICNCLibUserContext userContext) { _loadOptionsManager = loadOptionsManager ?? throw new ArgumentNullException(); _userContext = userContext ?? throw new ArgumentNullException(); ((CNCLibUserContext)_userContext).InitFromController(this); }
public MachineController(IMachineManager manager, ICNCLibUserContext userContext) { _manager = manager ?? throw new ArgumentNullException(); _userContext = userContext ?? throw new ArgumentNullException(); ((CNCLibUserContext)_userContext).InitFromController(this); }
public MachineController(IMachineService service, ICNCLibUserContext usercontext) { _service = service ?? throw new ArgumentNullException(); _userContext = usercontext ?? throw new ArgumentNullException(); ((CNCLibUserContext)_userContext).InitFromController(this); }
public EepromConfigurationController(IEepromConfigurationManager eepromConfigurationManager, ICNCLibUserContext userContext) { _eepromConfigurationManager = eepromConfigurationManager ?? throw new ArgumentNullException(); _userContext = userContext ?? throw new ArgumentNullException(); ((CNCLibUserContext)_userContext).InitFromController(this); }
public MachineRepository(CNCLibContext context, ICNCLibUserContext userContext) : base(context) { _userContext = userContext ?? throw new ArgumentNullException(); }
public UserFileController(IUserFileManager manager, ICNCLibUserContext userContext) { _manager = manager; _userContext = userContext; }
public ItemController(IItemManager manager, ICNCLibUserContext userContext) { _manager = manager; _userContext = userContext; }
public UserService(IUserManager manager, ICNCLibUserContext userContext) : base(manager) { _manager = manager; _userContext = userContext; }
public SetupWindowViewModel(IFactory <IMachineService> machineService, IFactory <IJoystickService> joystickService, IMapper mapper, Global global, ICNCLibUserContext userContext) { _machineService = machineService ?? throw new ArgumentNullException(); _joystickService = joystickService ?? throw new ArgumentNullException(); _mapper = mapper ?? throw new ArgumentNullException(); _global = global ?? throw new ArgumentNullException(); _userContext = userContext ?? throw new ArgumentNullException(); ResetOnConnect = false; }
public MachineController(IMachineManager manager, ICNCLibUserContext userContext) { _manager = manager; _userContext = userContext; }
public LoadOptionsController(ILoadOptionsManager manager, ICNCLibUserContext userContext) { _manager = manager; _userContext = userContext; }
public CambamController(ILoadOptionsService loadOptionsService, ICNCLibUserContext usercontext) { _loadOptionsService = loadOptionsService ?? throw new ArgumentNullException(); _usercontext = usercontext ?? throw new ArgumentNullException(); ((CNCLibUserContext)_usercontext).InitFromController(this); }
public EepromConfigurationController(IEepromConfigurationService eepromConfigurationService, ICNCLibUserContext usercontext) { _eepromConfigurationService = eepromConfigurationService ?? throw new ArgumentNullException(); _usercontext = usercontext ?? throw new ArgumentNullException(); ((CNCLibUserContext)_usercontext).InitFromController(this); }