Exemplo n.º 1
0
        public DeliveryChannelConfig DeepCloneWithAction(DeliveryChannelAction action)
        {
            var result = new DeliveryChannelConfig(
                this.Channel?.DeepClone(),
                action);

            return(result);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="DeliveryChannelConfig"/> class.
        /// </summary>
        /// <param name="channel">The delivery channel.</param>
        /// <param name="action">The action to take on the delivery channel.</param>
        public DeliveryChannelConfig(
            IDeliveryChannel channel,
            DeliveryChannelAction action)
        {
            new { channel }.AsArg().Must().NotBeNull();
            new { action }.AsArg().Must().NotBeEqualTo(DeliveryChannelAction.Unknown);

            this.Channel = channel;
            this.Action  = action;
        }