示例#1
0
        private RedirectResult(Uri location, StatusCodeResult.IDependencyProvider dependencies)
        {
            if (location == null)
            {
                throw new ArgumentNullException("location");
            }

            Contract.Assert(dependencies != null);

            _location = location;
            _dependencies = dependencies;
        }
        private RedirectResult(Uri location, StatusCodeResult.IDependencyProvider dependencies)
        {
            if (location == null)
            {
                throw new ArgumentNullException("location");
            }

            Contract.Assert(dependencies != null);

            _location     = location;
            _dependencies = dependencies;
        }
        private UnauthorizedResult(IEnumerable<AuthenticationHeaderValue> challenges,
            StatusCodeResult.IDependencyProvider dependencies)
        {
            if (challenges == null)
            {
                throw new ArgumentNullException("challenges");
            }

            Contract.Assert(dependencies != null);

            _challenges = challenges;
            _dependencies = dependencies;
        }
        private UnauthorizedResult(IEnumerable <AuthenticationHeaderValue> challenges,
                                   StatusCodeResult.IDependencyProvider dependencies)
        {
            if (challenges == null)
            {
                throw new ArgumentNullException("challenges");
            }

            Contract.Assert(dependencies != null);

            _challenges   = challenges;
            _dependencies = dependencies;
        }
        private FormattedContentResult(HttpStatusCode statusCode, T content, MediaTypeFormatter formatter,
                                       MediaTypeHeaderValue mediaType, StatusCodeResult.IDependencyProvider dependencies)
        {
            if (formatter == null)
            {
                throw new ArgumentNullException("formatter");
            }

            Contract.Assert(dependencies != null);

            _statusCode   = statusCode;
            _content      = content;
            _formatter    = formatter;
            _mediaType    = mediaType;
            _dependencies = dependencies;
        }
        private JsonResult(T content, JsonSerializerSettings serializerSettings, Encoding encoding,
                           StatusCodeResult.IDependencyProvider dependencies)
        {
            if (serializerSettings == null)
            {
                throw new ArgumentNullException("serializerSettings");
            }

            if (encoding == null)
            {
                throw new ArgumentNullException("encoding");
            }

            Contract.Assert(dependencies != null);

            _content            = content;
            _serializerSettings = serializerSettings;
            _encoding           = encoding;
            _dependencies       = dependencies;
        }
示例#7
0
        private OkResult(StatusCodeResult.IDependencyProvider dependencies)
        {
            Contract.Assert(dependencies != null);

            _dependencies = dependencies;
        }
示例#8
0
        private BadRequestResult(StatusCodeResult.IDependencyProvider dependencies)
        {
            Contract.Assert(dependencies != null);

            _dependencies = dependencies;
        }
        private InternalServerErrorResult(StatusCodeResult.IDependencyProvider dependencies)
        {
            Contract.Assert(dependencies != null);

            _dependencies = dependencies;
        }
示例#10
0
        private InternalServerErrorResult(StatusCodeResult.IDependencyProvider dependencies)
        {
            Contract.Assert(dependencies != null);

            _dependencies = dependencies;
        }