public ViewModelMorningSnapshot(IDBInteractivity dbInteractivity, IManageSessions manageSessions, ILoggerFacade logger)
        {
            _dbInteractivity = dbInteractivity;
            _manageSessions  = manageSessions;
            _logger          = logger;

            _manageSessions.GetSession((session) =>
            {
                _dbInteractivity.RetrieveBenchmarkSelectionData(RetrieveBenchmarkSelectionDataCallBackMethod);
                _dbInteractivity.RetrieveUserPreferenceBenchmarkData(session.UserName, RetrieveUserPreferenceBenchmarkDataCallBackMethod);
            });
        }
        public CassandraExtension(ExtendedActorSystem system)
        {
            if (system == null) throw new ArgumentNullException("system");
            
            // Initialize fallback configuration defaults
            system.Settings.InjectTopLevelFallback(CassandraPersistence.DefaultConfig());

            // Get or add the session manager
            SessionManager = CassandraSession.Instance.Apply(system);
            
            // Read config
            var journalConfig = system.Settings.Config.GetConfig("cassandra-journal");
            JournalSettings = new CassandraJournalSettings(journalConfig);

            var snapshotConfig = system.Settings.Config.GetConfig("cassandra-snapshot-store");
            SnapshotStoreSettings = new CassandraSnapshotStoreSettings(snapshotConfig);
        }
Ejemplo n.º 3
0
        public ViewModelLoginForm(IManageLogins manageLogins, IManageSessions manageSessions, IRegionManager regionManager, ILoggerFacade logger)
        {
            _manageLogins   = manageLogins;
            _manageSessions = manageSessions;
            _regionManager  = regionManager;
            _logger         = logger;

            //try
            //{
            //    if (_manageSessions != null)
            //    {
            //        #region GetSession Service Call
            //        _manageSessions.GetSession((result) =>
            //        {
            //            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);
            //            if (result != null)
            //            {
            //                try
            //                {
            //                    Session session = result as Session;
            //                    Logging.LogMethodParameter(_logger, methodNamespace, result.ToString(), 1, result.UserName);
            //                    Logging.LogSessionClose(_logger, result.UserName);
            //                }
            //                catch (Exception ex)
            //                {
            //                    Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
            //                    Logging.LogException(_logger, ex);
            //                }
            //            }
            //        });
            //        #endregion
            //    }
            //}
            //catch (Exception ex)
            //{
            //    Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
            //    Logging.LogLoginException(_logger, ex);
            //}
        }
Ejemplo n.º 4
0
        public CassandraExtension(ExtendedActorSystem system)
        {
            if (system == null)
            {
                throw new ArgumentNullException("system");
            }

            // Initialize fallback configuration defaults
            system.Settings.InjectTopLevelFallback(CassandraPersistence.DefaultConfig());

            // Get or add the session manager
            SessionManager = CassandraSession.Instance.Apply(system);

            // Read config
            var journalConfig = system.Settings.Config.GetConfig("cassandra-journal");

            JournalSettings = new CassandraJournalSettings(journalConfig);

            var snapshotConfig = system.Settings.Config.GetConfig("cassandra-snapshot-store");

            SnapshotStoreSettings = new CassandraSnapshotStoreSettings(snapshotConfig);
        }