public RelayHandler(ISessionManagerFactory sessionManagerFactory, UdpSocketManager udpSocketManager, BlubSerializer serializer) { _magicNumberSessionManager = sessionManagerFactory.GetSessionManager <Guid>(SessionManagerType.MagicNumber); _udpSocketManager = udpSocketManager; _serializer = serializer; }
public ProudNetServerService(ILogger <ProudNetServerService> logger, IServiceProvider serviceProvider, IOptions <NetworkOptions> networkOptions, IOptions <ThreadingOptions> threadingOptions, P2PGroupManager groupManager, UdpSocketManager udpSocketManager, ISchedulerService schedulerService, ISessionManagerFactory sessionManagerFactory, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _logger = logger; _serviceProvider = serviceProvider; _networkOptions = networkOptions.Value; _threadingOptions = threadingOptions.Value; _groupManager = groupManager; _udpSocketManager = udpSocketManager; _schedulerService = schedulerService; _magicNumberSessionManager = sessionManagerFactory.GetSessionManager <Guid>(SessionManagerType.MagicNumber); _udpSessionManager = sessionManagerFactory.GetSessionManager <uint>(SessionManagerType.UdpId); InternalLoggerFactory.DefaultFactory = loggerFactory; var sessionManager = _serviceProvider.GetRequiredService <ISessionManager>(); sessionManager.Added += SessionManager_OnAdded; sessionManager.Removed += SessionManager_OnRemoved; }
public UdpHandler(ILogger <UdpHandler> logger, BlubSerializer serializer, ISessionManagerFactory sessionManagerFactory) { _serializer = serializer; _logger = logger; _magicNumberSessionManager = sessionManagerFactory.GetSessionManager <Guid>(SessionManagerType.MagicNumber); _udpSessionManager = sessionManagerFactory.GetSessionManager <uint>(SessionManagerType.UdpId); }
public AuthenticationHandler( ISessionManagerFactory sessionManagerFactory, IOptions <NetworkOptions> networkOptions, RSACryptoServiceProvider rsa) { _sessionManager = sessionManagerFactory.GetSessionManager <uint>(SessionManagerType.HostId); _networkOptions = networkOptions.Value; _rsa = rsa; }
public SessionHandler(ILogger <SessionHandler> logger, IOptions <NetworkOptions> networkOptions, RSACryptoServiceProvider rsa, IHostIdFactory hostIdFactory, ISessionFactory sessionFactory, ISessionManagerFactory sessionManagerFactory, ILoggerFactory loggerFactory) { _logger = logger; _networkOptions = networkOptions.Value; _rsa = rsa; _hostIdFactory = hostIdFactory; _sessionFactory = sessionFactory; _sessionManager = sessionManagerFactory.GetSessionManager <uint>(SessionManagerType.HostId); _loggerFactory = loggerFactory; }
public void Setup() { sessionManagerFactory = MockRepository.GenerateStub <ISessionManagerFactory>(); sessionManager = MockRepository.GenerateStub <ISessionManager>(); session = MockRepository.GenerateStub <ISession>(); transaction = MockRepository.GenerateStub <ITransaction>(); sessionManagerFactory.Stub(x => x.Resolve()).Return(sessionManager).Repeat.Any(); sessionManager.Stub(s => s.OpenSession()).Return(session).Repeat.Any(); session.Stub(s => s.BeginTransaction()).Return(transaction).Repeat.Any(); var perActionTransactionStore = new MockPerActionTransactionStore(); filter = new UnitOfWorkFilter(perActionTransactionStore, sessionManagerFactory); }
public void Setup() { sessionManagerFactory = MockRepository.GenerateStub<ISessionManagerFactory>(); sessionManager = MockRepository.GenerateStub<ISessionManager>(); session = MockRepository.GenerateStub<ISession>(); transaction = MockRepository.GenerateStub<ITransaction>(); sessionManagerFactory.Stub(x => x.Resolve()).Return(sessionManager).Repeat.Any(); sessionManager.Stub(s => s.OpenSession()).Return(session).Repeat.Any(); session.Stub(s => s.BeginTransaction()).Return(transaction).Repeat.Any(); var perActionTransactionStore = new MockPerActionTransactionStore(); filter = new UnitOfWorkFilter(perActionTransactionStore, sessionManagerFactory); }
public P2PStatusHandler(ISessionManagerFactory sessionManagerFactory) { _udpSessionManager = sessionManagerFactory.GetSessionManager <uint>(SessionManagerType.UdpId); }
public UnitOfWorkFilter(IPerActionTransactionStore perActionTransactionStore, ISessionManagerFactory sessionManagerFactory) { this.sessionManagerFactory = sessionManagerFactory; this.perActionTransactionStore = perActionTransactionStore; }
public AbstractNhibernateRepository() { _defaultSessionFactoryHelper = new DefaultSessionFactoryHelper(); _sessionManagerFactory = new DefaultSessionManagerFactory(_defaultSessionFactoryHelper.GetSessionFactory()); }
public UnitOfWorkFilter(IPerActionTransactionStore perActionTransactionStore, ISessionManagerFactory sessionManagerFactory) { this.sessionManagerFactory = sessionManagerFactory; this.perActionTransactionStore = perActionTransactionStore; }
public AbstractOracleNhibernateRepository() { _sessionManagerFactory = new DefaultSessionManagerFactory(_oracleSessionFactoryHelper.GetSessionFactory()); }
internal TelerikLicenseProvider(ISessionManagerFactory factory) { this._manager = factory.TryCreateManager(); }