/// <summary> /// Initializes a new instance of the <see cref="GameLogInHandler"/> class. /// </summary> /// <param name="logger">A reference to the logger to use in this handler.</param> /// <param name="clientsMap">A reference to the clients map.</param> public GameLogInHandler(ILogger <GameLogInHandler> logger, IClientsManager clientsMap) : base(logger) { clientsMap.ThrowIfNull(nameof(clientsMap)); this.clientsManager = clientsMap; }
/// <summary> /// Initializes a new instance of the <see cref="TcpServer"/> class. /// </summary> /// <param name="options">The options to intialize the instance with.</param> /// <param name="loggerFactory">A reference to the factory of loggers to use.</param> /// <param name="handlerSelector">A refrence to the selector of handlers for TCP messages.</param> /// <param name="clientsManager">A reference to a manager for clients.</param> /// <param name="listeners">A reference to the listeners to bind to the server.</param> /// <param name="gameworldAdapter">A reference to an adapter that will act as a client to the game world.</param> public TcpServer( IOptions <TcpServerOptions> options, ILoggerFactory loggerFactory, IHandlerSelector handlerSelector, IClientsManager clientsManager, IEnumerable <IListener> listeners, ITcpServerToGameworldAdapter gameworldAdapter) { options.ThrowIfNull(nameof(options)); loggerFactory.ThrowIfNull(nameof(loggerFactory)); handlerSelector.ThrowIfNull(nameof(handlerSelector)); listeners.ThrowIfNull(nameof(listeners)); gameworldAdapter.ThrowIfNull(nameof(gameworldAdapter)); if (!listeners.Any()) { throw new ArgumentException("No listeners found after composition.", nameof(listeners)); } DataAnnotationsValidator.ValidateObjectRecursive(options.Value); this.id = Guid.NewGuid().ToString(); this.logger = loggerFactory.CreateLogger <TcpServer>(); this.gameworldClientAdapter = gameworldAdapter; this.connectionToClientMap = new Dictionary <IConnection, IClient>(); this.clientsManager = clientsManager; this.Options = options.Value; this.BindListeners(loggerFactory, handlerSelector, listeners); }
/// <summary> /// Initializes a new instance of the <see cref="AddCreaturePacketWriter"/> class. /// </summary> /// <param name="logger">A reference to the logger in use.</param> /// <param name="clientsManager">A reference to the manager of clients.</param> public AddCreaturePacketWriter(ILogger <AddCreaturePacketWriter> logger, IClientsManager clientsManager) : base(logger) { clientsManager.ThrowIfNull(nameof(clientsManager)); this.clientsManager = clientsManager; }
public TokenController(IBearerTokenGenerator generator, IClientsManager clientsManager, IOptions <TokenAuthOptions> options) { this.generator = generator; this.clientsManager = clientsManager; this.options = options; }
public ProjectService(IProjectManager projectManager, IBudgetManager budgetManager, UserManager userManager, IClientsManager clientsManager, IMembersManager membersManager, IToDoListManager toDoListManager) { _projectManager = projectManager; _budgetManager = budgetManager; _userManager = userManager; _clientsManager = clientsManager; _membersManager = membersManager; _toDoListManager = toDoListManager; }
public GameServer(IKernel kernel) { Debug.WriteLine("GameServer::.ctor"); _kernel = kernel; _clientsManager = _kernel.Get<IClientsManager>(); _networkServer = _kernel.Get<INetworkServer>(); _worldManager = new WorldManager(); Controllers.ControllersRegistration.Register(); }
public NetworkServer(IConfigHelper config, ILoggerHelper log, IClientsManager clientsManager) { _config = config; _log = log; _clientsManager = clientsManager; _ip = _config.Get<IPAddress>("server.ip"); _port = _config.Get<int>("server.port"); _listener = new TcpListener(_ip, _port); _isPortOpen = false; }
public void ExecuteCore(ReadBuffer request, IClientConnection client, IClientsManager clientsManager) { Request = request; Client = client; ClientsManager = clientsManager; try { Execute(); } catch (Exception) { } }
public void executeCommand(IClientsManager manager) { }
public ControllerActivator(IClientConnection client, IClientsManager clientsManager) { _client = client; _clientsManager = clientsManager; }
public ClientsController(IClientsManager clientsManager, IAuthenticator authenticator) { this._clientsManager = clientsManager; this._authenticator = authenticator; }
public ClientService(IClientsManager clientsManager, IProjectManager projectManager) { _clientsManager = clientsManager; _projectManager = projectManager; }
// GET: Crm public CrmController(IClientsManager clientManager) { _clientManager = clientManager; }