Microsoft.AspNetCore.Http.Abstractions
Helper code for the various activator services.
Instantiate a type with constructor arguments provided directly and/or from an .
The service provider used to resolve dependencies
The type to activate
Constructor arguments not provided by the .
An activated object of type instanceType
Create a delegate that will instantiate a type with constructor arguments provided directly
and/or from an .
The type to activate
The types of objects, in order, that will be passed to the returned function as its second parameter
A factory that will instantiate instanceType using an
and an argument array containing objects matching the types defined in argumentTypes
Instantiate a type with constructor arguments provided directly and/or from an .
The type to activate
The service provider used to resolve dependencies
Constructor arguments not provided by the .
An activated object of type T
Retrieve an instance of the given type from the service provider. If one is not found then instantiate it directly.
The type of the service
The service provider used to resolve dependencies
The resolved service or created instance
Retrieve an instance of the given type from the service provider. If one is not found then instantiate it directly.
The service provider
The type of the service
The resolved service or created instance
Marks the constructor to be used when activating type using .
The result of .
The to get service arguments from.
Additional constructor arguments.
The instantiated type.
Used to store the results of an Authenticate call.
The .
The .
The .
Contains information describing an authentication provider.
Initializes a new instance of the class
Initializes a new instance of the class
Contains metadata about the authentication provider.
Gets or sets the name used to reference the authentication middleware instance.
Gets or sets the display name for the authentication provider.
Constant used to represent the automatic scheme
Creates a challenge for the authentication manager with .
A that represents the asynchronous challenge operation.
Creates a challenge for the authentication manager with .
Additional arbitrary values which may be used by particular authentication types.
A that represents the asynchronous challenge operation.
Dictionary used to store state values about the authentication session.
Initializes a new instance of the class
Initializes a new instance of the class
State values about the authentication session.
Gets or sets whether the authentication session is persisted across multiple requests.
Gets or sets the full path or absolute URI to be used as an HTTP redirect response value.
Gets or sets the time at which the authentication ticket was issued.
Gets or sets the time at which the authentication ticket expires.
Gets or sets if refreshing the authentication session should be allowed.
Gets or sets a unique identifier to represent this connection.
Defines settings used to create a cookie.
The name of the cookie.
The cookie path.
Determines the value that will set on .
The domain to associate the cookie with.
Determines the value that will set on .
Indicates whether a cookie is accessible by client-side script.
Determines the value that will set on .
The SameSite attribute of the cookie. The default value is
Determines the value that will set on .
The policy that will be used to determine .
This is determined from the passed to .
Gets or sets the lifespan of a cookie.
Gets or sets the max-age for the cookie.
Indicates if this cookie is essential for the application to function correctly. If true then
consent policy checks may be bypassed. The default value is false.
Creates the cookie options from the given .
The .
The cookie options.
Creates the cookie options from the given with an expiration based on and .
The .
The time to use as the base for computing .
The cookie options.
Determines how cookie security properties are set.
If the URI that provides the cookie is HTTPS, then the cookie will only be returned to the server on
subsequent HTTPS requests. Otherwise if the URI that provides the cookie is HTTP, then the cookie will
be returned to the server on all HTTP and HTTPS requests. This is the default value because it ensures
HTTPS for all authenticated requests on deployed servers, and also supports HTTP for localhost development
and for servers that do not have HTTPS support.
Secure is always marked true. Use this value when your login page and all subsequent pages
requiring the authenticated identity are HTTPS. Local development will also need to be done with HTTPS urls.
Secure is not marked true. Use this value when your login page is HTTPS, but other pages
on the site which are HTTP also require authentication information. This setting is not recommended because
the authentication information provided with an HTTP request may be observed and used by other computers
on your local network or wireless connection.
Add new values. Each item remains a separate array entry.
The to use.
The header name.
The header value.
Quotes any values containing commas, and then comma joins all of the values with any existing values.
The to use.
The header name.
The header values.
Get the associated values from the collection separated into individual values.
Quoted values will not be split, and the quotes will be removed.
The to use.
The header name.
the associated values from the collection separated into individual values, or StringValues.Empty if the key is not present.
Quotes any values containing commas, and then comma joins all of the values.
The to use.
The header name.
The header values.
Convenience methods for writing to the response.
Writes the given text to the response body. UTF-8 encoding will be used.
The .
The text to write to the response.
Notifies when request operations should be cancelled.
A task that represents the completion of the write operation.
Writes the given text to the response body using the given encoding.
The .
The text to write to the response.
The encoding to use.
Notifies when request operations should be cancelled.
A task that represents the completion of the write operation.
Provides correct handling for FragmentString value when needed to generate a URI string
Represents the empty fragment string. This field is read-only.
Initialize the fragment string with a given value. This value must be in escaped and delimited format with
a leading '#' character.
The fragment string to be assigned to the Value property.
The escaped fragment string with the leading '#' character
True if the fragment string is not empty
Provides the fragment string escaped in a way which is correct for combining into the URI representation.
A leading '#' character will be included unless the Value is null or empty. Characters which are potentially
dangerous are escaped.
The fragment string value
Provides the fragment string escaped in a way which is correct for combining into the URI representation.
A leading '#' character will be included unless the Value is null or empty. Characters which are potentially
dangerous are escaped.
The fragment string value
Returns an FragmentString given the fragment as it is escaped in the URI format. The string MUST NOT contain any
value that is not a fragment.
The escaped fragment as it appears in the URI format.
The resulting FragmentString
Returns an FragmentString given the fragment as from a Uri object. Relative Uri objects are not supported.
The Uri object
The resulting FragmentString
Represents the host portion of a URI can be used to construct URI's properly formatted and encoded for use in
HTTP headers.
Creates a new HostString without modification. The value should be Unicode rather than punycode, and may have a port.
IPv4 and IPv6 addresses are also allowed, and also may have ports.
Creates a new HostString from its host and port parts.
The value should be Unicode rather than punycode. IPv6 addresses must use square braces.
A positive, greater than 0 value representing the port in the host string.
Returns the original value from the constructor.
Returns the value of the host part of the value. The port is removed if it was present.
IPv6 addresses will have brackets added if they are missing.
Returns the value of the port part of the host, or null if none is found.
Returns the value as normalized by ToUriComponent().
Returns the value properly formatted and encoded for use in a URI in a HTTP header.
Any Unicode is converted to punycode. IPv6 addresses will have brackets added if they are missing.
Creates a new HostString from the given URI component.
Any punycode will be converted to Unicode.
Creates a new HostString from the host and port of the give Uri instance.
Punycode will be converted to Unicode.
Matches the host portion of a host header value against a list of patterns.
The host may be the encoded punycode or decoded unicode form so long as the pattern
uses the same format.
Host header value with or without a port.
A set of pattern to match, without ports.
The port on the given value is ignored. The patterns should not have ports.
The patterns may be exact matches like "example.com", a top level wildcard "*"
that matches all hosts, or a subdomain wildcard like "*.example.com" that matches
"abc.example.com:443" but not "example.com:443".
Matching is case insensitive.
Compares the equality of the Value property, ignoring case.
Compares against the given object only if it is a HostString.
Gets a hash code for the value.
Compares the two instances for equality.
Compares the two instances for inequality.
Parses the current value. IPv6 addresses will have brackets added if they are missing.
Encapsulates all HTTP-specific information about an individual HTTP request.
Gets the collection of HTTP features provided by the server and middleware available on this request.
Gets the object for this request.
Gets the object for this request.
Gets information about the underlying connection for this request.
Gets an object that manages the establishment of WebSocket connections for this request.
This is obsolete and will be removed in a future version.
The recommended alternative is to use Microsoft.AspNetCore.Authentication.AuthenticationHttpContextExtensions.
See https://go.microsoft.com/fwlink/?linkid=845470.
Gets or sets the user for this request.
Gets or sets a key/value collection that can be used to share data within the scope of this request.
Gets or sets the that provides access to the request's service container.
Notifies when the connection underlying this request is aborted and thus request operations should be
cancelled.
Gets or sets a unique identifier to represent this request in trace logs.
Gets or sets the object used to manage user session data for this request.
Aborts the connection underlying this request.
Represents the incoming side of an individual HTTP request.
Gets the for this request.
Gets or sets the HTTP method.
The HTTP method.
Gets or sets the HTTP request scheme.
The HTTP request scheme.
Returns true if the RequestScheme is https.
true if this request is using https; otherwise, false.
Gets or sets the Host header. May include the port.
The Host header.
Gets or sets the RequestPathBase.
The RequestPathBase.
Gets or sets the request path from RequestPath.
The request path from RequestPath.
Gets or sets the raw query string used to create the query collection in Request.Query.
The raw query string.
Gets the query value collection parsed from Request.QueryString.
The query value collection parsed from Request.QueryString.
Gets or sets the RequestProtocol.
The RequestProtocol.
Gets the request headers.
The request headers.
Gets the collection of Cookies for this request.
The collection of Cookies for this request.
Gets or sets the Content-Length header.
The value of the Content-Length header, if any.
Gets or sets the Content-Type header.
The Content-Type header.
Gets or sets the RequestBody Stream.
The RequestBody Stream.
Checks the Content-Type header for form types.
true if the Content-Type header represents a form content type; otherwise, false.
Gets or sets the request body as a form.
Reads the request body if it is a form.
Represents the outgoing side of an individual HTTP request.
Gets the for this response.
Gets or sets the HTTP response code.
Gets the response headers.
Gets or sets the response body .
Gets or sets the value for the Content-Length response header.
Gets or sets the value for the Content-Type response header.
Gets an object that can be used to manage cookies for this response.
Gets a value indicating whether response headers have been sent to the client.
Adds a delegate to be invoked just before response headers will be sent to the client.
The delegate to execute.
A state object to capture and pass back to the delegate.
Adds a delegate to be invoked just before response headers will be sent to the client.
The delegate to execute.
Adds a delegate to be invoked after the response has finished being sent to the client.
The delegate to invoke.
A state object to capture and pass back to the delegate.
Registers an object for disposal by the host once the request has finished processing.
The object to be disposed.
Adds a delegate to be invoked after the response has finished being sent to the client.
The delegate to invoke.
Returns a temporary redirect response (HTTP 302) to the client.
The URL to redirect the client to. This must be properly encoded for use in http headers
where only ASCII characters are allowed.
Returns a redirect response (HTTP 301 or HTTP 302) to the client.
The URL to redirect the client to. This must be properly encoded for use in http headers
where only ASCII characters are allowed.
True if the redirect is permanent (301), otherwise false (302).
Defines middleware that can be added to the application's request pipeline.
Request handling method.
The for the current request.
The delegate representing the remaining middleware in the request pipeline.
A that represents the execution of this middleware.
Provides methods to create middleware.
Creates a middleware instance for each request.
The concrete of the .
The instance.
Releases a instance at the end of each request.
The instance to release.
Provides correct escaping for Path and PathBase values when needed to reconstruct a request or redirect URI string
Represents the empty path. This field is read-only.
Initalize the path string with a given value. This value must be in unescaped format. Use
PathString.FromUriComponent(value) if you have a path value which is in an escaped format.
The unescaped path to be assigned to the Value property.
The unescaped path value
True if the path is not empty
Provides the path string escaped in a way which is correct for combining into the URI representation.
The escaped path value
Provides the path string escaped in a way which is correct for combining into the URI representation.
The escaped path value
Returns an PathString given the path as it is escaped in the URI format. The string MUST NOT contain any
value that is not a path.
The escaped path as it appears in the URI format.
The resulting PathString
Returns an PathString given the path as from a Uri object. Relative Uri objects are not supported.
The Uri object
The resulting PathString
Determines whether the beginning of this instance matches the specified .
The to compare.
true if value matches the beginning of this string; otherwise, false.
Determines whether the beginning of this instance matches the specified when compared
using the specified comparison option.
The to compare.
One of the enumeration values that determines how this and value are compared.
true if value matches the beginning of this string; otherwise, false.
Determines whether the beginning of this instance matches the specified and returns
the remaining segments.
The to compare.
The remaining segments after the match.
true if value matches the beginning of this string; otherwise, false.
Determines whether the beginning of this instance matches the specified when compared
using the specified comparison option and returns the remaining segments.
The to compare.
One of the enumeration values that determines how this and value are compared.
The remaining segments after the match.
true if value matches the beginning of this string; otherwise, false.
Determines whether the beginning of this instance matches the specified and returns
the matched and remaining segments.
The to compare.
The matched segments with the original casing in the source value.
The remaining segments after the match.
true if value matches the beginning of this string; otherwise, false.
Determines whether the beginning of this instance matches the specified when compared
using the specified comparison option and returns the matched and remaining segments.
The to compare.
One of the enumeration values that determines how this and value are compared.
The matched segments with the original casing in the source value.
The remaining segments after the match.
true if value matches the beginning of this string; otherwise, false.
Adds two PathString instances into a combined PathString value.
The combined PathString value
Combines a PathString and QueryString into the joined URI formatted string value.
The joined URI formatted string value
Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
The second PathString for comparison.
True if both PathString values are equal
Compares this PathString value to another value using a specific StringComparison type
The second PathString for comparison
The StringComparison type to use
True if both PathString values are equal
Compares this PathString value to another value. The default comparison is StringComparison.OrdinalIgnoreCase.
The second PathString for comparison.
True if both PathString values are equal
Returns the hash code for the PathString value. The hash code is provided by the OrdinalIgnoreCase implementation.
The hash code
Operator call through to Equals
The left parameter
The right parameter
True if both PathString values are equal
Operator call through to Equals
The left parameter
The right parameter
True if both PathString values are not equal
The left parameter
The right parameter
The ToString combination of both values
The left parameter
The right parameter
The ToString combination of both values
Operator call through to Add
The left parameter
The right parameter
The PathString combination of both values
Operator call through to Add
The left parameter
The right parameter
The PathString combination of both values
Implicitly creates a new PathString from the given string.
Implicitly calls ToString().
'{0}' is not available.
'{0}' is not available.
No public '{0}' or '{1}' method found for middleware of type '{2}'.
No public '{0}' or '{1}' method found for middleware of type '{2}'.
'{0}' or '{1}' does not return an object of type '{2}'.
'{0}' or '{1}' does not return an object of type '{2}'.
The '{0}' or '{1}' method's first argument must be of type '{2}'.
The '{0}' or '{1}' method's first argument must be of type '{2}'.
Multiple public '{0}' or '{1}' methods are available.
Multiple public '{0}' or '{1}' methods are available.
The path in '{0}' must start with '/'.
The path in '{0}' must start with '/'.
Unable to resolve service for type '{0}' while attempting to Invoke middleware '{1}'.
Unable to resolve service for type '{0}' while attempting to Invoke middleware '{1}'.
The '{0}' method must not have ref or out parameters.
The '{0}' method must not have ref or out parameters.
The value must be greater than zero.
The value must be greater than zero.
No service for type '{0}' has been registered.
No service for type '{0}' has been registered.
'{0}' failed to create middleware of type '{1}'.
'{0}' failed to create middleware of type '{1}'.
Types that implement '{0}' do not support explicit arguments.
Types that implement '{0}' do not support explicit arguments.
Argument cannot be null or empty.
Argument cannot be null or empty.
Provides correct handling for QueryString value when needed to reconstruct a request or redirect URI string
Represents the empty query string. This field is read-only.
Initialize the query string with a given value. This value must be in escaped and delimited format with
a leading '?' character.
The query string to be assigned to the Value property.
The escaped query string with the leading '?' character
True if the query string is not empty
Provides the query string escaped in a way which is correct for combining into the URI representation.
A leading '?' character will be included unless the Value is null or empty. Characters which are potentially
dangerous are escaped.
The query string value
Provides the query string escaped in a way which is correct for combining into the URI representation.
A leading '?' character will be included unless the Value is null or empty. Characters which are potentially
dangerous are escaped.
The query string value
Returns an QueryString given the query as it is escaped in the URI format. The string MUST NOT contain any
value that is not a query.
The escaped query as it appears in the URI format.
The resulting QueryString
Returns an QueryString given the query as from a Uri object. Relative Uri objects are not supported.
The Uri object
The resulting QueryString
Create a query string with a single given parameter name and value.
The un-encoded parameter name
The un-encoded parameter value
The resulting QueryString
Creates a query string composed from the given name value pairs.
The resulting QueryString
Creates a query string composed from the given name value pairs.
The resulting QueryString
A function that can process an HTTP request.
The for the request.
A task that represents the completion of request processing.
Manages the establishment of WebSocket connections for a specific HTTP request.
Gets a value indicating whether the request is a WebSocket establishment request.
Gets the list of requested WebSocket sub-protocols.
Transitions the request to a WebSocket connection.
A task representing the completion of the transition.
Transitions the request to a WebSocket connection using the specified sub-protocol.
The sub-protocol to use.
A task representing the completion of the transition.
Extension methods for the .
Branches the request pipeline based on matches of the given request path. If the request path starts with
the given path, the branch is executed.
The instance.
The request path to match.
The branch to take for positive path matches.
The instance.
Respresents a middleware that maps a request path to a sub-request pipeline.
Creates a new instace of .
The delegate representing the next middleware in the request pipeline.
The middleware options.
Executes the middleware.
The for the current request.
A task that represents the execution of this middleware.
Options for the .
The path to match.
The branch taken for a positive match.
Respresents a middleware that runs a sub-request pipeline when a given predicate is matched.
Creates a new instance of .
The delegate representing the next middleware in the request pipeline.
The middleware options.
Executes the middleware.
The for the current request.
A task that represents the execution of this middleware.
Options for the .
The user callback that determines if the branch should be taken.
The branch taken for a positive match.
Represents a middleware that extracts the specified path base from request path and postpend it to the request path base.
Creates a new instace of .
The delegate representing the next middleware in the request pipeline.
The path base to extract.
Executes the middleware.
The for the current request.
A task that represents the execution of this middleware.
Extension methods for the .
Branches the request pipeline based on the result of the given predicate.
Invoked with the request environment to determine if the branch should be taken
Configures a branch to take
Extension methods for adding terminal middleware.
Adds a terminal middleware delegate to the application's request pipeline.
The instance.
A delegate that handles the request.
Extension methods for adding middleware.
Adds a middleware delegate defined in-line to the application's request pipeline.
The instance.
A function that handles the request or calls the given next function.
The instance.
Extension methods for adding typed middleware.
Adds a middleware type to the application's request pipeline.
The middleware type.
The instance.
The arguments to pass to the middleware type instance's constructor.
The instance.
Adds a middleware type to the application's request pipeline.
The instance.
The middleware type.
The arguments to pass to the middleware type instance's constructor.
The instance.
Extension methods for .
Adds a middleware that extracts the specified path base from request path and postpend it to the request path base.
The instance.
The path base to extract.
The instance.
Extension methods for .
Conditionally creates a branch in the request pipeline that is rejoined to the main pipeline.
Invoked with the request environment to determine if the branch should be taken
Configures a branch to take
Defines a class that provides the mechanisms to configure an application's request pipeline.
Gets or sets the that provides access to the application's service container.
Gets the set of HTTP features the application's server provides.
Gets a key/value collection that can be used to share data between middleware.
Adds a middleware delegate to the application's request pipeline.
The middleware delegate.
The .
Creates a new that shares the of this
.
The new .
Builds the delegate used by this application to process HTTP requests.
The request handling delegate.