public ChannelOperationOutcomeInfo DeepCloneWithOutcome(ChannelOperationOutcome outcome)
        {
            var result = new ChannelOperationOutcomeInfo(
                this.ChannelOperationTrackingCodeId.DeepClone(),
                this.EventType?.DeepClone(),
                outcome);

            return(result);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ChannelOperationOutcomeInfo"/> class.
        /// </summary>
        /// <param name="channelOperationTrackingCodeId">The tracking code identifier for the channel operation.</param>
        /// <param name="eventType">The type of event that specified the outcome.</param>
        /// <param name="outcome">The outcome of executing the operation.</param>
        public ChannelOperationOutcomeInfo(
            long channelOperationTrackingCodeId,
            TypeRepresentation eventType,
            ChannelOperationOutcome outcome)
        {
            new { eventType }.AsArg().Must().NotBeNull();
            new { outcome }.AsArg().Must().NotBeEqualTo(ChannelOperationOutcome.Unknown);

            this.ChannelOperationTrackingCodeId = channelOperationTrackingCodeId;
            this.EventType = eventType;
            this.Outcome   = outcome;
        }