Skip to content

Conversation

@birojnayak
Copy link
Contributor

Porting GetService to HttpContextWrapper . This will fix the issue #456


public override object GetService(Type serviceType)
{
return ((HttpContextCore)_context).RequestServices.GetService(serviceType);
Copy link
Member

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

@birojnayak birojnayak force-pushed the HttpContextWrapperFix branch from de5ee2d to 6f5b309 Compare December 8, 2023 21:08
public override void SetSessionStateBehavior(SessionStateBehavior sessionStateBehavior) => _context.SetSessionStateBehavior(sessionStateBehavior);

public override object? GetService(Type serviceType)
{
Copy link
Member

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

@birojnayak birojnayak force-pushed the HttpContextWrapperFix branch from 6f5b309 to 1de5364 Compare December 9, 2023 02:05
@birojnayak birojnayak force-pushed the HttpContextWrapperFix branch from 1de5364 to f5eda9b Compare December 9, 2023 02:16
Copy link
Member

@twsouthwick twsouthwick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@twsouthwick twsouthwick merged commit aa10c36 into dotnet:main Dec 15, 2023
@birojnayak birojnayak deleted the HttpContextWrapperFix branch December 15, 2023 16:55
birojnayak added a commit to birojnayak/systemweb-adapters that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants