public MyContext(IConfigurationRoot configuration, IDbRepository db, MessageSenderFactory senderFactory) { _config = configuration; _db = db; _wsSender = senderFactory.Create(SocketDisconnected); _activeSockets = new ConcurrentDictionary <WebSocket, MySocket>(); _activeSessions = new ConcurrentDictionary <int, ConcurrentBag <MySocket> >(); }
public MessageReceiver(IDbRepository db, IMyContext myContext, MessageSenderFactory senderFactory, Searcher searcher) { _myContext = myContext; _db = db; _sender = senderFactory.Create(_myContext.SocketDisconnected); _searcher = searcher; _responseFunctions = Mapper.BuildResponseFunctions(this); }