Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseMessage"/> class.
 /// </summary>
 /// <param name="correlationId">The correlation id.</param>
 /// <param name="returnValue">The return value.</param>
 /// <param name="methodInvocationException">The method invocation exception.</param>
 public ResponseMessage(String correlationId, MethodParameter returnValue, Exception methodInvocationException)
     : base(correlationId, MessageTypeEnum.Response)
 {
     if (string.IsNullOrEmpty(correlationId))
     {
         ThrowHelper.ThrowArgumentNullException("correlationId");
     }
     if (returnValue == null)
     {
         ThrowHelper.ThrowArgumentNullException("returnValue");
     }
     this.mReturnValue = returnValue;
     this.mMethodInvocationException = methodInvocationException;
 }
Пример #2
0
        /// <summary>
        /// Determines whether the specified <see cref="System.Object"/> is equal to this instance.
        /// </summary>
        /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param>
        /// <returns>
        ///   <c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            if (!obj.GetType().Equals(GetType()))
            {
                return(false);
            }

            MethodParameter other = (MethodParameter)obj;

            return(other.mId == mId &&
                   other.mClassName == mClassName &&
                   other.mValue == mValue &&
                   other.mSize == mSize);
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseMessage"/> class.
 /// </summary>
 /// <param name="correlationId">The correlation id.</param>
 /// <param name="returnValue">The return value.</param>
 public ResponseMessage(String correlationId, MethodParameter returnValue)
     : this(correlationId, returnValue, null)
 {
 }