Ejemplo n.º 1
0
        public EmailsCommand(
            ISettingsQuery settingsQuery,
            ISettingsCommand settingsCommand,
            ICommunicationEngine communicationEngine,
            ITemplateEngine templateEngine,
            IAffiliateEmailsQuery affiliateEmailsQuery,
            IUserEmailsQuery userEmailsQuery,
            string memberServicesAddress,
            string employerServicesAddress,
            string systemAddress,
            string returnAddress,
            string servicesDisplayName,
            string allStaffAddress,
            string allStaffDisplayName,
            string redStarResumeAddress,
            string redStarResumeDisplayName)
        {
            _settingsQuery        = settingsQuery;
            _settingsCommand      = settingsCommand;
            _communicationEngine  = communicationEngine;
            _templateEngine       = templateEngine;
            _affiliateEmailsQuery = affiliateEmailsQuery;
            _userEmailsQuery      = userEmailsQuery;

            _memberServicesUser   = new EmailUser(memberServicesAddress, servicesDisplayName, null);
            _employerServicesUser = new EmailUser(employerServicesAddress, servicesDisplayName, null);
            _systemUser           = new EmailUser(systemAddress, servicesDisplayName, null);
            _allStaffUser         = new EmailUser(allStaffAddress, allStaffDisplayName, null);
            _redStarResume        = new EmailUser(redStarResumeAddress, redStarResumeDisplayName, null);
            _returnUser           = new EmailUser(returnAddress, servicesDisplayName, null);
        }
        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;
        }
Ejemplo n.º 3
0
 public EmotionAnalysisSettings(ConfigurationSettings settings, ICommunicationEngine communicationEngine) : base(settings, communicationEngine)
 {
 }
Ejemplo n.º 4
0
 public TextAnalyticAnalysisSettings(ConfigurationSettings settings, ICommunicationEngine communicationEngine) : base(settings, communicationEngine)
 {
 }
        public static CoreAnalysisSettings UsingCustomCommunication(this ConfigurationSettings configSettings, ICommunicationEngine communicationEngine)
        {
            configSettings.DiagnosticLogger.LogInfo("Using custom communication", "Communications");

            return(new CoreAnalysisSettings(configSettings, communicationEngine));
        }
Ejemplo n.º 6
0
 public CoreAnalysisSettings(ConfigurationSettings settings, ICommunicationEngine communicationEngine)
 {
     ActionsToPerform      = new Dictionary <ApiActionType, IApiActionData>();
     ConfigurationSettings = settings;
     CommunicationEngine   = communicationEngine;
 }