Пример #1
0
        //-----------------------------------------------------------
        // 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);
        }
Пример #2
0
		/// <summary>
		/// Copy constructor
		/// </summary>
		/// <param name="result">Source to copy</param>
		public ActionReply(ActionReply result)
			: this()
		{
			//Payload = result.Payload;
		}
Пример #3
0
		//-----------------------------------------------------------
		// 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;
		}
Пример #4
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="result">Source to copy</param>
 public ActionReply(ActionReply result)
     : this()
 {
     //Payload = result.Payload;
 }
Пример #5
0
 //-----------------------------------------------------------
 // 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);
 }
Пример #6
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="result">Source to copy</param>
 public ActionReply(ActionReply result)
     : this()
 {
     Value = result.Value;
 }