Class EndpointMiddleware<TResult>
- Namespace
- Steeltoe.Management.Endpoint.Middleware
- Assembly
- Steeltoe.Management.EndpointBase.dll
public class EndpointMiddleware<TResult>
Type Parameters
TResult
- Inheritance
-
EndpointMiddleware<TResult>
- Derived
-
- Inherited Members
-
Constructors
EndpointMiddleware(IEndpoint<TResult>, IEnumerable<IManagementOptions>, IEnumerable<HttpMethod>, bool, ILogger)
public EndpointMiddleware(IEndpoint<TResult> endpoint, IEnumerable<IManagementOptions> mgmtOptions, IEnumerable<HttpMethod> allowedMethods = null, bool exactRequestPathMatching = true, ILogger logger = null)
Parameters
endpoint
IEndpoint<TResult>
mgmtOptions
IEnumerable<IManagementOptions>
allowedMethods
IEnumerable<HttpMethod>
exactRequestPathMatching
bool
logger
ILogger
EndpointMiddleware(IEndpoint<TResult>, IEnumerable<HttpMethod>, bool, ILogger)
[Obsolete("Use newer constructor that passes in IManagementOptions instead")]
public EndpointMiddleware(IEndpoint<TResult> endpoint, IEnumerable<HttpMethod> allowedMethods = null, bool exactRequestPathMatching = true, ILogger logger = null)
Parameters
endpoint
IEndpoint<TResult>
allowedMethods
IEnumerable<HttpMethod>
exactRequestPathMatching
bool
logger
ILogger
EndpointMiddleware(IEnumerable<IManagementOptions>, IEnumerable<HttpMethod>, bool, ILogger)
public EndpointMiddleware(IEnumerable<IManagementOptions> mgmtOptions, IEnumerable<HttpMethod> allowedMethods = null, bool exactRequestPathMatching = true, ILogger logger = null)
Parameters
mgmtOptions
IEnumerable<IManagementOptions>
allowedMethods
IEnumerable<HttpMethod>
exactRequestPathMatching
bool
logger
ILogger
EndpointMiddleware(IEnumerable<HttpMethod>, bool, ILogger)
[Obsolete("Use newer constructor that passes in IManagementOptions instead")]
public EndpointMiddleware(IEnumerable<HttpMethod> allowedMethods = null, bool exactRequestPathMatching = true, ILogger logger = null)
Parameters
allowedMethods
IEnumerable<HttpMethod>
exactRequestPathMatching
bool
logger
ILogger
Fields
_allowedMethods
protected IEnumerable<HttpMethod> _allowedMethods
Field Value
- IEnumerable<HttpMethod>
_endpoint
protected IEndpoint<TResult> _endpoint
Field Value
- IEndpoint<TResult>
_exactRequestPathMatching
protected bool _exactRequestPathMatching
Field Value
- bool
_logger
protected ILogger _logger
Field Value
- ILogger
_mgmtOptions
protected IList<IManagementOptions> _mgmtOptions
Field Value
- IList<IManagementOptions>
Methods
HandleRequest()
public virtual string HandleRequest()
Returns
- string
RequestVerbAndPathMatch(string, string)
public virtual bool RequestVerbAndPathMatch(string httpMethod, string requestPath)
Parameters
httpMethod
string
requestPath
string
Returns
- bool
Serialize(TResult)
protected virtual string Serialize(TResult result)
Parameters
result
TResult
Returns
- string