public Recoverable() { RoutingContext context = null; #region SetDeliveryConstraintNonDurable context.AddDeliveryConstraint(new NonDurableDelivery()); #endregion #region ReadDeliveryConstraintNonDurable NonDurableDelivery constraint; context.TryGetDeliveryConstraint(out constraint); #endregion }
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 }