Beispiel #1
0
        public IAsyncResult BeginOpen(AmqpSession session, TimeSpan timeout, AsyncCallback callback, object state)
        {
            Utils.Trace(TraceLevel.Info, "{0}: Begin open a link to the tx coordinator.", this);
            string uniqueueName = Guid.NewGuid().ToString("N");
            Source source = new Source();
            source.Address = uniqueueName;
            source.DistributionMode = DistributionMode.Move;

            Coordinator coordinator = new Coordinator();
            AmqpLinkSettings settings = new AmqpLinkSettings();
            settings.Source = source;
            settings.Target = coordinator;
            settings.LinkName = uniqueueName;
            settings.Role = false;

            this.sendLink = new SendingAmqpLink(session, settings);
            return this.sendLink.BeginOpen(timeout, callback, state);
        }
Beispiel #2
0
        public static Source Clone(this Source source)
        {
            Source clone = new Source();
            clone.Address = source.Address;
            clone.Durable = source.Durable;
            clone.ExpiryPolicy = source.ExpiryPolicy;
            clone.Timeout = source.Timeout;
            clone.DistributionMode = source.DistributionMode;
            clone.FilterSet = source.FilterSet;
            clone.DefaultOutcome = source.DefaultOutcome;
            clone.Outcomes = source.Outcomes;
            clone.Capabilities = source.Capabilities;

            return clone;
        }
Beispiel #3
0
 public Terminus(Source source)
 {
     Fx.Assert(source != null, "source cannot be null");
     this.source = source;
 }