public ReplyReceiverBuilder(
            MessageReceiver messageReceiver,
            ISerialiser serialiser,
            IMainThreadMarshaller mainThreadMarshaller,
            MessageHandlerRouter router)
        {
            Contract.Requires(messageReceiver != null);
            Contract.Requires(serialiser != null);
            Contract.Requires(mainThreadMarshaller != null);
            Contract.Requires(router != null);

            this.messageReceiver = messageReceiver;
            this.serialiser = serialiser;
            this.mainThreadMarshaller = mainThreadMarshaller;
            this.router = router;
        }
        internal RequestRecieveChannelBuilder(
            ReplyAddressLookup replyAddressLookup,
            ISerialiser serialiser,
            MessageHandlerRouter messageHandlerRouter,
            AcknowledgementSender acknowledgementSender,
            MessageCacheFactory messageCacheFactory,
            ISystemTime systemTime,
            ITaskRepeater taskRepeater,
            ServerAddressRegistry serverAddressRegistry,
            IMainThreadMarshaller mainThreadMarshaller,
            AuthenticationSessionCache authenticationSessionCache,
            AuthenticatedServerRegistry authenticatedServerRegistry,
            ReplyCorrelationLookup correlationLookup)
        {
            Contract.Requires(replyAddressLookup != null);
            Contract.Requires(serialiser != null);
            Contract.Requires(messageHandlerRouter != null);
            Contract.Requires(acknowledgementSender != null);
            Contract.Requires(messageCacheFactory != null);
            Contract.Requires(systemTime != null);
            Contract.Requires(taskRepeater != null);
            Contract.Requires(serverAddressRegistry != null);
            Contract.Requires(mainThreadMarshaller != null);
            Contract.Requires(authenticationSessionCache != null);
            Contract.Requires(authenticatedServerRegistry != null);
            Contract.Requires(correlationLookup != null);

            this.replyAddressLookup = replyAddressLookup;
            this.serialiser = serialiser;
            this.messageHandlerRouter = messageHandlerRouter;
            this.acknowledgementSender = acknowledgementSender;
            this.messageCacheFactory = messageCacheFactory;
            this.systemTime = systemTime;
            this.taskRepeater = taskRepeater;
            this.serverAddressRegistry = serverAddressRegistry;
            this.mainThreadMarshaller = mainThreadMarshaller;
            this.authenticationSessionCache = authenticationSessionCache;
            this.authenticatedServerRegistry = authenticatedServerRegistry;
            this.correlationLookup = correlationLookup;
        }
 internal SubscriberRecieveChannelBuilder(
     ISerialiser serialiser, 
     MessageHandlerRouter messageHandlerRouter, 
     MessageReceiver messageReceiver,
     AcknowledgementSender acknowledgementSender,
     MessageCacheFactory messageCacheFactory, 
     ISystemTime systemTime, 
     ITaskRepeater taskRepeater, 
     ServerAddressRegistry serverAddressRegistry, 
     IMainThreadMarshaller mainThreadMarshaller, 
     AuthenticationSessionCache authenticationSessionCache, 
     AuthenticatedServerRegistry authenticatedServerRegistry)
 {
     Contract.Requires(serialiser != null);
     Contract.Requires(messageHandlerRouter != null);
     Contract.Requires(messageReceiver != null);
     Contract.Requires(acknowledgementSender != null);
     Contract.Requires(messageCacheFactory != null);
     Contract.Requires(systemTime != null);
     Contract.Requires(taskRepeater != null);
     Contract.Requires(serverAddressRegistry != null);
     Contract.Requires(mainThreadMarshaller != null);
     Contract.Requires(authenticationSessionCache != null);
     Contract.Requires(authenticatedServerRegistry != null);
     
     this.serialiser = serialiser;
     this.messageHandlerRouter = messageHandlerRouter;
     this.messageReceiver = messageReceiver;
     this.acknowledgementSender = acknowledgementSender;
     this.messageCacheFactory = messageCacheFactory;
     this.systemTime = systemTime;
     this.taskRepeater = taskRepeater;
     this.serverAddressRegistry = serverAddressRegistry;
     this.mainThreadMarshaller = mainThreadMarshaller;
     this.authenticationSessionCache = authenticationSessionCache;
     this.authenticatedServerRegistry = authenticatedServerRegistry;
 }
예제 #4
0
 public ThrottleFactory(IMainThreadMarshaller marshaller)
 {
     this.marshaller = marshaller;
 }
 public MainThreadMarshalledThrottle(
     IMainThreadMarshaller marshaller,
     Action toRun, TimeSpan throttleTime)
     : base(() => marshaller.RunOnMainThread(toRun), throttleTime)
 {
 }