Пример #1
0
        protected SubscribedWorkflow(TDialog dialog, ISubscription subscription)
            :
            base(dialog, subscription)
        {
            this.Subscription.Subscribed += this.Subscription_Subscribed;

            this.subscriberInfo = new SubscriberInfo(subscription.LocalSubscriber);
        }
Пример #2
0
        protected TRequest CreateRequest <TRequest>(Func <MessageId, SubscriberId, SubscriberId, TRequest> createRequestCallback)
            where TRequest : IRequest
        {
            SubscriberInfo subscriberInfo = this.SubscriberInfo;

            return(createRequestCallback(MessageId.NextId(),
                                         subscriberInfo.LocalSubscriber.Id,
                                         subscriberInfo.GetRemoteSubscriber().Id));
        }
Пример #3
0
        protected TMessage CreateMessage <TMessage>(Func <MessageId, SubscriberId, SubscriberId, TMessage> createMessageCallback)
            where TMessage : IMessage
        {
            SubscriberInfo subscriberInfo = this.SubscriberInfo;

            return(createMessageCallback(MessageId.NextId(),
                                         subscriberInfo.LocalSubscriber.Id,
                                         subscriberInfo.GetRemoteSubscriber().Id));
        }
Пример #4
0
 public SubscribedEventArgs(SubscriberInfo subscriberInfo)
 {
     this.SubscriberInfo = subscriberInfo;
 }
Пример #5
0
 private void Subscription_Subscribed(Object sender, SubscribedEventArgs e)
 {
     this.SubscriberInfo = e.SubscriberInfo;
 }
Пример #6
0
 public void Subscribe(SubscriberInfo subscriberInfo)
 {
     this.OnSubscribed(new SubscribedEventArgs(subscriberInfo));
 }