コード例 #1
0
        /// <summary>
        /// Initialize new CaterpillarHttpRequestBase instance.
        /// </summary>
        /// <param name="requestContext">RequestContext object which has information about an HTTP request that matches a defined route.</param>
        /// <exception cref="">Throws argument null exception, if <paramref name="requestContext"/> is null.</exception>
        public CaterpillarHttpRequestBase(RequestContext requestContext)
        {
            if (requestContext == null)
            {
                ArgumentNullOrEmptyException.Throw("requestContext");
            }

            this.Request        = this.RequestContext.HttpContext.Request;
            this.RequestContext = requestContext;
        }
コード例 #2
0
        public CaterpillarHttpRequestBase(HttpRequestBase httpRequest)
        {
            if (httpRequest == null)
            {
                ArgumentNullOrEmptyException.Throw("httpRequest");
            }

            this.Request        = httpRequest;
            this.RequestContext = this.Request.RequestContext;
        }