public void Setup() { mOutgoingRequestSerializer = new WampOutgoingRequestSerializer <MockRaw>(new MockRawFormatter()); mComparer = new WampMessageEqualityComparer <MockRaw> (new MockRawComparer()); }
private static WampClientBuilderFactory <TMessage> GetWampClientBuilder(IWampFormatter <TMessage> formatter) { WampOutgoingRequestSerializer <TMessage> wampOutgoingRequestSerializer = new WampOutgoingRequestSerializer <TMessage>(formatter); WampOutgoingMessageHandlerBuilder <TMessage> wampOutgoingMessageHandlerBuilder = new WampOutgoingMessageHandlerBuilder <TMessage>(); return(new WampClientBuilderFactory <TMessage> (wampOutgoingRequestSerializer, wampOutgoingMessageHandlerBuilder)); }
/// <summary> /// Creates a new instance of <see cref="WampBindingHost{TMessage}"/> /// </summary> /// <param name="realmContainer">The <see cref="IWampRealmContainer"/> this binding host /// is associated with.</param> /// <param name="connectionListener">The <see cref="IWampConnectionListener{TMessage}"/> this /// binding host listens to.</param> /// <param name="binding">The <see cref="IWampBinding{TMessage}"/> associated with this binding host.</param> public WampBindingHost(IWampHostedRealmContainer realmContainer, IWampRouterBuilder builder, IWampConnectionListener <TMessage> connectionListener, IWampBinding <TMessage> binding) { IWampOutgoingRequestSerializer outgoingRequestSerializer = new WampOutgoingRequestSerializer <TMessage>(binding.Formatter); IWampEventSerializer eventSerializer = GetEventSerializer(outgoingRequestSerializer); IWampSessionServer <TMessage> session = builder.CreateSessionHandler(realmContainer, binding, eventSerializer); mSession = session; mListener = GetWampListener(connectionListener, binding, outgoingRequestSerializer); }
private ManualWampServerProxyBuilder <TMessage, TRawClient> GetServerProxyBuilder <TRawClient>() { WampOutgoingRequestSerializer <TMessage> outgoingRequestSerializer = new WampOutgoingRequestSerializer <TMessage>(Formatter); WampServerProxyIncomingMessageHandlerBuilder <TMessage, TRawClient> incomingHandlerBuilder = new WampServerProxyIncomingMessageHandlerBuilder <TMessage, TRawClient>(Formatter); WampServerProxyOutgoingMessageHandlerBuilder <TMessage, TRawClient> outgoingHandlerBuilder = new WampServerProxyOutgoingMessageHandlerBuilder <TMessage, TRawClient>(incomingHandlerBuilder); return(new ManualWampServerProxyBuilder <TMessage, TRawClient> (outgoingRequestSerializer, outgoingHandlerBuilder)); }
public void Setup() { mOutgoingRequestSerializer = new WampOutgoingRequestSerializer<MockRaw>(new MockRawFormatter()); mComparer = new WampMessageEqualityComparer<MockRaw> (new MockRawComparer()); }