Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HandlerResponse"/> class.
        /// </summary>
        /// <param name="response">The inner <see cref="HandlerResponse"/>.</param>
        public HandlerResponse(HandlerResponse response)
        {
            if (response == null)
            {
                Error.ArgumentNull("response");
            }

            this.response = response;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HandlerResponseException"/> class.
        /// </summary>
        /// <param name="response">The response message.</param>
        public HandlerResponseException(HandlerResponse response)
            : base(Resources.HandlerResponseExceptionMessage)
        {
            if (response == null)
            {
                throw Error.ArgumentNull("response");
            }

            this.Response = response;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="HandlerResponseException"/> class.
        /// </summary>
        /// <param name="response">The response message.</param>
        public HandlerResponseException(HandlerResponse response)
            : base(Resources.HandlerResponseExceptionMessage)
        {
            if (response == null)
            {
                throw Error.ArgumentNull("response");
            }

            this.Response = response;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Attaches the given <paramref name="request"/> to the <paramref name="response"/> if the response does not already
 /// have a pointer to a request.
 /// </summary>
 /// <param name="response">The response.</param>
 /// <param name="request">The request.</param>
 public static void EnsureResponseHasRequest(HandlerResponse response, CommandHandlerRequest request)
 {
     if (response != null && response.Request == null)
     {
         response.Request = request;
     }
 }