public CombatController(IRepository<CombatLog> repo, IHashCreator hasher, IStringParser parser, ICombatParser combatParser) { this.repo = repo; this.hasher = hasher; this.parser = parser; this.combatParser = combatParser; }
public LoginDataProvider( IUsersDataAccessor usersDataAccessor, IHashCreator hashCreator, ITokenProvider tokenProvider) { _usersDataAccessor = usersDataAccessor; _hashCreator = hashCreator; _tokenProvider = tokenProvider; }
public ConnectionViewModel(ICommunicationEngine communicationEngine, IWebRequestor webRequestor, IHashCreator hashCreator) { _communicationEngine = communicationEngine; _webRequestor = webRequestor; _hashCreator = hashCreator; //Give the communication engine a way to reference back to this instance. if (_communicationEngine != null) { _communicationEngine.ParentConnectionViewModel = this; } Traffic = new ObservableList <TrafficData>(Application.Current.Dispatcher); //Create the command documents that this view model sends once here so we don't have to //create them each time the command is sent. _versionCommandDocument = XDocument.Parse("<Version/>"); _supportedCulturesCommandDocument = XDocument.Parse("<SupportedCultures/>"); _instrumentInfoCommandDocument = XDocument.Parse("<InstrumentInfo/>"); _logoffCommandDocument = XDocument.Parse("<Logoff/>"); _inRemoteControlModeDocument = XDocument.Parse("<RemoteControlState/>"); SupportedCultures = new ObservableList <LanguageElement>(Application.Current.Dispatcher); InstrumentInfo = new ObservableList <InstrumentInfoElement>(Application.Current.Dispatcher); IsTcpConnection = true; HttpServer = "remote.lecosoftware.com"; //Initialize default connection parameters. Port = 12345; var address = Dns.GetHostAddresses(Dns.GetHostName()).FirstOrDefault(x => x.AddressFamily == AddressFamily.InterNetwork); if (address != null) { IpAddress = address.ToString(); } //Create the commands that the view will bind to. ConnectCommand = new RelayCommand(OnConnect); DisconnectCommand = new RelayCommand(OnDisconnect); LogonCommand = new RelayCommand(OnLogon); LogoffCommand = new RelayCommand(OnLogoff); GetInstrumentListCommand = new RelayCommand(OnGetInstrumentList); //We want to know if the app becomes disconnected so subscribe to diconnected event. EventAggregatorContext.Current.GetEvent <ClientDisconnectedEvent>().Subscribe(OnClientDisconnected); //Listen to our own property changes PropertyChanged += ConnectionViewModel_PropertyChanged; }