コード例 #1
0
 public InProcessMessageDispatcher(ILogger logger, IPersistedSettings persistedSettings)
 {
     _logger = logger;
     _requestSubjectLookup  = new Dictionary <Guid, RequestSubjectContext>();
     _responseSubjectLookup = new ConcurrentDictionary <Guid, Subject <IOnPremiseConnectorResponse> >();
     _originId = persistedSettings?.OriginId ?? throw new ArgumentNullException(nameof(persistedSettings));
 }
コード例 #2
0
 public ShellViewModel(UserContext userContext, ServersContainerViewModel serversContainerViewModel, LoadingViewModel loadingViewModel, LoginViewModel logingViewModel, RegistrationViewModel registerViewModel, HeaderBarViewModel headerViewModel, SettingsTabViewModel settingsViewModel, P2PModalViewModel p2PModalViewModel, CyberSecReconnectViewModel cyberSectReconnectViewModel, CyberSecModalViewModel cyberSecModalViewModel, AppSelectViewModel appSelectViewModel, IPersistedSettings settings, P2PTrafficStatusObserver p2PTrafficStatusObserver, MapViewModel mapViewModel, TrayViewModel trayViewModel, ExpiredMembershipViewModel expiredMembershipViewModel, ExpiredMembershipObserver expiredMembershipObserver, SubHeaderStripViewModel subHeaderStripViewModel, HeaderBarViewModel headerBarViewModel, AppWindowManager windowManager)
 {
     this._userContext                 = userContext;
     this._headerViewModel             = headerViewModel;
     this._settingsViewModel           = settingsViewModel;
     this._p2PModalViewModel           = p2PModalViewModel;
     this._cyberSectReconnectViewModel = cyberSectReconnectViewModel;
     this._cyberSecModalViewModel      = cyberSecModalViewModel;
     this._appSelectViewModel          = appSelectViewModel;
     this._settings = settings;
     this._serversContainerViewModel = serversContainerViewModel;
     this._mapViewModel      = mapViewModel;
     this._loadingViewModel  = loadingViewModel;
     this._loginViewModel    = logingViewModel;
     this._registerViewModel = registerViewModel;
     this.< SubHeaderStrip > k__BackingField                 = subHeaderStripViewModel;
     this.< HeaderBar > k__BackingField                      = headerBarViewModel;
     p2PTrafficStatusObserver.P2PTrafficRerouted            += new EventHandler(this.OnP2PTrafficRerouted);
     this._expiredMembershipViewModel                        = expiredMembershipViewModel;
     expiredMembershipObserver.ForegroundNotificationNeeded += new EventHandler(this.OnForegroundNotificationNeeded);
     this._windowManager = windowManager;
     this._userContext.add_UserAuthenticated(new EventHandler <UserEventArgs>(this.OnUserAuthenticated));
     this._userContext.add_UserLoggedIn(new EventHandler <UserEventArgs>(this.OnUserLoggedIn));
     this._userContext.add_UserLoggedOut(new EventHandler <UserEventArgs>(this.OnUserLoggedOut));
     this.< Tray > k__BackingField   = trayViewModel;
     this.Tray.ActivateAppRequested += new EventHandler(this.TrayOnActivateAppRequested);
     base.get_Items().AddRange(new Screen[]
     {
         serversContainerViewModel,
         mapViewModel,
         settingsViewModel
     });
 }
 public SelectAutoConnectViewModel(IPersistedSettings settings, AutoConnectManager autoConnectManager, AutoConnectServersProvider serversProvider) : base(settings)
 {
     this._autoConnectManager              = autoConnectManager;
     this._serversProvider                 = serversProvider;
     this._serversProvider.ServersChanged += delegate(object s, EventArgs e)
     {
         this.UpdateServers();
     };
 }
コード例 #4
0
 public SubHeaderStripViewModel(SubHeaderBarViewModel subHeaderBarViewModel, RestrictedLocationContainerViewModel restrictedLocationViewModel, UserContext userContext, IPersistedSettings settings, RestrictedLocationChecker restrictedLocationChecker)
 {
     this._subHeaderBarViewModel       = subHeaderBarViewModel;
     this._restrictedLocationViewModel = restrictedLocationViewModel;
     this._restrictedLocationChecker   = restrictedLocationChecker;
     this._userContext = userContext;
     this._settings    = settings;
     this._userContext.add_UserLoggedIn(new EventHandler <UserEventArgs>(this.OnUserLoggedIn));
     base.get_Items().Add(subHeaderBarViewModel);
     base.get_Items().Add(restrictedLocationViewModel);
 }
コード例 #5
0
        public BackendCommunication(IConfiguration configuration, IMessageDispatcher messageDispatcher, IOnPremiseConnectorCallbackFactory requestCallbackFactory, ILogger logger, IPersistedSettings persistedSettings, ILinkRepository linkRepository)
        {
            _configuration          = configuration ?? throw new ArgumentNullException(nameof(configuration));
            _messageDispatcher      = messageDispatcher ?? throw new ArgumentNullException(nameof(messageDispatcher));
            _requestCallbackFactory = requestCallbackFactory ?? throw new ArgumentNullException(nameof(requestCallbackFactory));
            _logger                    = logger;
            _linkRepository            = linkRepository ?? throw new ArgumentNullException(nameof(linkRepository));
            _requestCompletedCallbacks = new ConcurrentDictionary <string, IOnPremiseConnectorCallback>(StringComparer.OrdinalIgnoreCase);
            _connectionContexts        = new ConcurrentDictionary <string, IOnPremiseConnectionContext>();
            _requestSubscriptions      = new Dictionary <string, IDisposable>(StringComparer.OrdinalIgnoreCase);
            _cts = new CancellationTokenSource();
            _cancellationToken         = _cts.Token;
            _lastActivityDbUpdateDelay = new TimeSpan(_configuration.ActiveConnectionTimeout.Ticks / 5);
            OriginId = persistedSettings?.OriginId ?? throw new ArgumentNullException(nameof(persistedSettings));

            _logger?.Verbose("Creating backend communication. origin-id={OriginId}", OriginId);
            _logger?.Information("Backend communication is using message dispatcher {MessageDispatcherType}", messageDispatcher.GetType().Name);
        }
コード例 #6
0
 public RemoteFeedlistThreadHandler(Operation operation, RssBanditApplication rssBanditApp,
                                    RemoteStorageProtocolType protocol, string remoteLocation,
                                    string credentialUser, string credentialPwd, IPersistedSettings settings)
 {
     operationToRun      = operation;
     this.rssBanditApp   = rssBanditApp;
     remoteProtocol      = protocol;
     this.remoteLocation = remoteLocation;
     this.credentialUser = credentialUser;
     credentialPassword  = credentialPwd;
     this.settings       = settings;
 }
コード例 #7
0
 public ShellWindowPlacementSaver(IPersistedSettings settings)
 {
     this._settings = settings;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LuceneSettings"/> class.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 public LuceneSettings(INewsComponentsConfiguration configuration)
 {
     settings  = configuration.PersistedSettings;
     behavior  = configuration.SearchIndexBehavior;
     indexPath = BuildAndCreateIndexDirectoryPath(configuration);
 }
 public EncryptedCredentialsStore(IPersistedSettings settings)
 {
     this._settings = settings;
 }
コード例 #10
0
 public AppStartupManager(AppStartup appStartup, IPersistedSettings settings)
 {
     this._appStartup = appStartup;
     this._settings   = settings;
 }
コード例 #11
0
 public CyberSecHostsStorage(ICyberSecHostsProvider cyberSecHostsProvider, IPersistedSettings settings)
 {
     this._cyberSecHostsProvider = cyberSecHostsProvider;
     this._settings = settings;
 }
コード例 #12
0
        public RabbitMqMessageDispatcher(ILogger logger, IConnection connection, IConfiguration configuration, IPersistedSettings persistedSettings)
        {
            _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
            _connection    = connection ?? throw new ArgumentNullException(nameof(connection));
            _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));

            _originId = persistedSettings?.OriginId ?? throw new ArgumentNullException(nameof(persistedSettings));
        }
コード例 #13
0
        public RabbitMqMessageDispatcher(ILogger logger, IConfiguration configuration, IConnection connection, IPersistedSettings persistedSettings)
        {
            _logger        = logger;
            _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));

            if (connection == null)
            {
                throw new ArgumentNullException(nameof(connection));
            }

            _model    = connection.CreateModel();
            _encoding = new UTF8Encoding(false, true);

            _originId = persistedSettings?.OriginId ?? throw new ArgumentNullException(nameof(persistedSettings));

            DeclareExchange(_EXCHANGE_NAME);
        }
コード例 #14
0
 public AutoConnectManager(AutoConnector autoConnector, IPersistedSettings settings)
 {
     this._autoConnector = autoConnector;
     this._settings      = settings;
 }