public ConnectionsManager(ITransportResource resource, IUsersRepository userRepository, ICommandSerializer serializer) { _resource = resource; _userRepository = userRepository; _serializer = serializer; _resource.Received += _resource_OnReceived; _timer = new Timer(OnTimerTick, null, TimerInterval); }
public ApplicationManager( ITransportResource transportResource, IStorage storage, IDeviceInfo deviceInfo) { _transport = transportResource; _storage = storage; DeviceInfo = deviceInfo; Initialize (); }
public ConnectionManager( ITransportResource transport, CommandBuffer commandBuffer, CommandParser commandParser, RequestsHandler requestsHandler, IDtoSerializer serializer) { _transport = transport; _commandBuffer = commandBuffer; _commandParser = commandParser; _requestsHandler = requestsHandler; _serializer = serializer; _commandBuffer.CommandAssembled += CommandBuffer_CommandAssembled; _transport.DataReceived += data => _commandBuffer.AppendBytes(data); _transport.ConnectionError += Transport_ConnectionError; }
public ApplicationManager( ITransportResource transportResource, IDtoSerializer dtoSerializer, IStorage storage, IDeviceInfo deviceInfo) { var commandParser = new CommandParser(); var connectionManager = new ConnectionManager(transportResource, new CommandBuffer(commandParser), commandParser, new RequestsHandler(), dtoSerializer); AccountManager = new AccountManager(storage, deviceInfo, connectionManager, new ProfileServiceProxy(connectionManager), new RegistrationServiceProxy(connectionManager), new AuthenticationServiceProxy(connectionManager)); ChatManager = new ChatManager(connectionManager, new ChatServiceProxy(connectionManager), AccountManager); FriendsManager = new FriendsManager(connectionManager, new FriendsServiceProxy(connectionManager)); SearchManager = new SearchManager(connectionManager, new UsersSearchServiceProxy(connectionManager)); ConnectionManager = connectionManager; }
public ApplicationManager( ITransportResource transportResource, IDtoSerializer dtoSerializer, IStorage storage, IDeviceInfo deviceInfo) { //we don't have autofac so let's build the tree var commandParser = new CommandParser(); var connectionManager = new ConnectionManager(transportResource, new CommandBuffer(commandParser), commandParser, new RequestsHandler(), dtoSerializer); AccountManager = new AccountManager(storage, deviceInfo, connectionManager, new ProfileServiceProxy(connectionManager), new RegistrationServiceProxy(connectionManager), new AuthenticationServiceProxy(connectionManager)); ChatManager = new ChatManager(connectionManager, new ChatServiceProxy(connectionManager), AccountManager); FriendsManager = new FriendsManager(connectionManager, new FriendsServiceProxy(connectionManager)); SearchManager = new SearchManager(connectionManager, new UsersSearchServiceProxy(connectionManager)); ConnectionManager = connectionManager; }
public TransportManager(ITransportResource resource, ICommandSerializer serializer) { _resource = resource; _serializer = serializer; _resource.Received += _resource_OnReceived; }