コード例 #1
0
 public CourierClientFacadeImpl(ManageableCourierEndpoint localEndpoint, MessageSender messageSender, MessageRouter messageRouter, ReadablePeerRegistry peerRegistry)
 {
     this.localEndpoint = localEndpoint;
     this.messageSender = messageSender;
     this.messageRouter = messageRouter;
     this.peerRegistry  = peerRegistry;
 }
コード例 #2
0
        public CourierAnnouncerImpl(
            IThreadingProxy threadingProxy,
            ManageableCourierEndpoint localEndpoint,
            OutboundEnvelopeManager outboundEnvelopeManager)
        {
            this.threadingProxy          = threadingProxy;
            this.localEndpoint           = localEndpoint;
            this.outboundEnvelopeManager = outboundEnvelopeManager;

            this.thread = threadingProxy.CreateThread(ThreadStart, new ThreadCreationOptions()
            {
                IsBackground = true
            });
            this.cancellationTokenSource = threadingProxy.CreateCancellationTokenSource();
        }
コード例 #3
0
        public static void SetProperty <TValue>(this ManageableCourierEndpoint courierEndpoint, TValue value)
        {
            var guid = ((GuidAttribute)typeof(TValue).GetCustomAttribute(typeof(GuidAttribute))).Value;

            courierEndpoint.SetProperty(Guid.Parse(guid), value);
        }