コード例 #1
0
        public Recoverable()
        {
            RoutingContext context = null;

            #region SetDeliveryConstraintNonDurable
            context.AddDeliveryConstraint(new NonDurableDelivery());
            #endregion

            #region ReadDeliveryConstraintNonDurable
            NonDurableDelivery constraint;
            context.TryGetDeliveryConstraint(out constraint);
            #endregion
        }
コード例 #2
0
        public TimeToBeReceived()
        {
            RoutingContext context = null;

            #region SetDeliveryConstraintDiscardIfNotReceivedBefore
            var timeToBeReceived = TimeSpan.FromSeconds(25);
            context.AddDeliveryConstraint(new DiscardIfNotReceivedBefore(timeToBeReceived));
            #endregion

            #region ReadDeliveryConstraintDiscardIfNotReceivedBefore
            DiscardIfNotReceivedBefore constraint;
            context.TryGetDeliveryConstraint(out constraint);
            timeToBeReceived = constraint.MaxTime;
            #endregion
        }