protected NetworkerServerBase(ServerConfiguration configuration, INetworkerLogger logger, IList <INetworkerPacketHandlerModule> modules, IContainerIoc container) { this.configuration = configuration; this.Logger = logger; this.container = container; this.Connections = new List <TcpConnection>(); this.packetSerializer = new PacketSerializer(); this.packetDeserializer = new PacketDeserializer(); this.packetHandlers = new Dictionary <string, Type>(); this.packetHandlerSingletons = new Dictionary <string, IServerPacketHandler>(); foreach (var module in modules) { this.RegisterTypesFromModule(module); } this.container.RegisterSingleton <ITcpConnectionsProvider>( new TcpConnectionsProvider(this.Connections)); this.container.RegisterSingleton(logger); this.RegisterPacketHandler <PingRequestPacket, PingRequestPacketHandler>(); }
public ExampleServer(ServerConfiguration configuration, INetworkerLogger logger, IList <INetworkerPacketHandlerModule> modules, IContainerIoc container) : base(configuration, logger, modules, container) { this.ClientConnected += this.ClientConnectedEvent; }
public DefaultServer(ServerConfiguration configuration, INetworkerLogger logger, IList <INetworkerPacketHandlerModule> modules, IContainerIoc container) : base(configuration, logger, modules, container) { }
public PaymentService(IContainerIoc pContainer) : base(pContainer) { _storeDal = AbstractUnityConfig.Resolve <IStoreDal>(); _mockClearSaleDal = AbstractUnityConfig.Resolve <IMockClearSaleDal>(); _paymentDal = AbstractUnityConfig.Resolve <IPaymentDal>(); _paymentBll = AbstractUnityConfig.Resolve <IPaymentBll>(); }
public NetworkerServerBuilder() { this.container = new ServiceCollectionContainer(new ServiceCollection()); this.configuration = new ServerConfiguration(); this.logger = new NetworkerLogger(); this.packetHandlerModule = new DefaultPacketHandlerModule(); this.modules = new List <INetworkerPacketHandlerModule>(); this.modules.Add(this.packetHandlerModule); }
public INetworkerServerBuilder UseIocContainer(IContainerIoc newContainer) { this.container = newContainer; return(this); }
protected AbstractDal(IContainerIoc container) { _container = container; }
public StoreDal(IContainerIoc container) : base(container) { _optionsBuilder = new DbContextOptionsBuilder <PaymentGatewayContext>(); }
public MockClearSaleDal(IContainerIoc container) : base(container) { }
protected AbstractService(IContainerIoc pContainer) { Container = pContainer; }
public PaymentBll(IContainerIoc pContainer) { }