private static WampListener <TMessage> GetWampListener(IWampConnectionListener <TMessage> connectionListener, IWampFormatter <TMessage> formatter, IWampServer <TMessage> server) { IWampClientBuilderFactory <TMessage, IWampClient> clientBuilderFactory = GetWampClientBuilder(formatter); IWampClientContainer <TMessage, IWampClient> clientContainer = new WampClientContainer <TMessage>(clientBuilderFactory); IWampRequestMapper <TMessage> requestMapper = new WampRequestMapper <TMessage>(server.GetType(), formatter); WampMethodBuilder <TMessage, IWampClient> methodBuilder = new WampMethodBuilder <TMessage, IWampClient>(server, formatter); IWampIncomingMessageHandler <TMessage, IWampClient> wampIncomingMessageHandler = new WampIncomingMessageHandler <TMessage, IWampClient> (requestMapper, methodBuilder); return(new WampListener <TMessage> (connectionListener, wampIncomingMessageHandler, clientContainer)); }
private WampListener <TMessage> GetWampListener(IWampConnectionListener <TMessage> connectionListener, IWampBinding <TMessage> binding, IWampOutgoingRequestSerializer outgoingRequestSerializer) { IWampClientBuilderFactory <TMessage, IWampClientProxy <TMessage> > clientBuilderFactory = GetWampClientBuilder(binding, outgoingRequestSerializer); IWampClientContainer <TMessage, IWampClientProxy <TMessage> > clientContainer = new WampClientContainer <TMessage>(clientBuilderFactory); IWampRequestMapper <TMessage> requestMapper = new WampRequestMapper <TMessage>(typeof(WampServer <TMessage>), binding.Formatter); WampRealmMethodBuilder <TMessage> methodBuilder = new WampRealmMethodBuilder <TMessage>(mSession, binding.Formatter); IWampIncomingMessageHandler <TMessage, IWampClientProxy <TMessage> > wampIncomingMessageHandler = new WampIncomingMessageHandler <TMessage, IWampClientProxy <TMessage> > (requestMapper, methodBuilder); return(new WampListener <TMessage> (connectionListener, wampIncomingMessageHandler, clientContainer, mSession)); }
private IWampIncomingMessageHandler <JToken, IWampClient> GetHandler(IWampServer <JToken> wampServer) { IWampIncomingMessageHandler <JToken, IWampClient> handler = new WampIncomingMessageHandler <JToken, IWampClient> (new WampRequestMapper <JToken>(wampServer.GetType(), mFormatter), new WampMethodBuilder <JToken, IWampClient>(wampServer, mFormatter)); return(handler); }
private IWampIncomingMessageHandler <JToken, IWampClient> GetHandler(object instance) { IWampIncomingMessageHandler <JToken, IWampClient> handler = new WampIncomingMessageHandler <JToken, IWampClient> (new WampRequestMapper <JToken>(instance.GetType(), mFormatter), new WampMethodBuilder <JToken, IWampClient>(instance, mFormatter)); return(handler); }
private IWampIncomingMessageHandler<JToken, IWampClient> GetHandler(IWampServer<JToken> wampServer) { IWampIncomingMessageHandler<JToken, IWampClient> handler = new WampIncomingMessageHandler<JToken, IWampClient> (new WampRequestMapper<JToken>(wampServer.GetType(), mFormatter), new WampMethodBuilder<JToken, IWampClient>(wampServer, mFormatter)); return handler; }
public BaseScenario() { Binding = new MockBinding(); ClientBuilder = new WampMockClientBuilder <MockRaw>(Binding); mServer = CreateServer(); Handler = new WampIncomingMessageHandler <MockRaw, IWampClientProxy <MockRaw> > (new WampRequestMapper <MockRaw>(mServer.GetType(), Binding.Formatter), new WampMethodBuilder <MockRaw, IWampClientProxy <MockRaw> > (mServer, Binding.Formatter)); }
private IWampIncomingMessageHandler<JToken, IWampClient> GetHandler(object instance) { IWampIncomingMessageHandler<JToken, IWampClient> handler = new WampIncomingMessageHandler<JToken, IWampClient> (new WampRequestMapper<JToken>(instance.GetType(), mFormatter), new WampMethodBuilder<JToken, IWampClient>(instance, mFormatter)); return handler; }