-
Notifications
You must be signed in to change notification settings - Fork 66
Get the GetService into HttpContextWrapper #457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
public override object GetService(Type serviceType) | ||
{ | ||
return ((HttpContextCore)_context).RequestServices.GetService(serviceType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should delegate to the _context.GetService method. The HttpContext.GetService()
method could hook into the _context.RequestServices
de5ee2d
to
6f5b309
Compare
@@ -81,5 +81,10 @@ public override IPrincipal User | |||
public override void RewritePath(string filePath, string pathInfo, string? queryString, bool setClientFilePath) => _context.RewritePath(filePath, pathInfo, queryString, setClientFilePath); | |||
|
|||
public override void SetSessionStateBehavior(SessionStateBehavior sessionStateBehavior) => _context.SetSessionStateBehavior(sessionStateBehavior); | |||
|
|||
public override object? GetService(Type serviceType) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use expression instead similar to the rest of the methods
6f5b309
to
1de5364
Compare
1de5364
to
f5eda9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Porting GetService to HttpContextWrapper . This will fix the issue #456