//----------------------------------------------------------- // convenience methods //----------------------------------------------------------- /// <summary> /// Merge source values (messages, exceptions, etc) into this reply setting status to most severe /// </summary> /// <param name="source">Values to be merged into this reply</param> /// <returns>Reference to this object with content merged</returns> public virtual ActionReply Merge(ActionReply source) { foreach (var msg in source.Messages) { this.Messages.Add(msg); } this.Status = source.Status; this.CorrelationId = source.CorrelationId; this.Value = source.Value ?? this.Value; foreach (var kvp in source) { this.Add(kvp); } return(this); }
/// <summary> /// Copy constructor /// </summary> /// <param name="result">Source to copy</param> public ActionReply(ActionReply result) : this() { //Payload = result.Payload; }
//----------------------------------------------------------- // convenience methods //----------------------------------------------------------- /// <summary> /// Merge source values (messages, exceptions, etc) into this reply setting status to most severe /// </summary> /// <param name="source">Values to be merged into this reply</param> /// <returns>Reference to this object with content merged</returns> public virtual ActionReply Merge(ActionReply source) { InnerReplies.Add(source); return this; }
//----------------------------------------------------------- // convenience methods //----------------------------------------------------------- /// <summary> /// Merge source values (messages, exceptions, etc) into this reply setting status to most severe /// </summary> /// <param name="source">Values to be merged into this reply</param> /// <returns>Reference to this object with content merged</returns> public virtual ActionReply Merge(ActionReply source) { InnerReplies.Add(source); return(this); }
/// <summary> /// Copy constructor /// </summary> /// <param name="result">Source to copy</param> public ActionReply(ActionReply result) : this() { Value = result.Value; }