Skip to content

Replace UseSession(SessionOptions) with UseSession(Action<SessionOptions>) #2402

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

Closed
aspnet-hello opened this issue Jan 1, 2018 · 5 comments
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares breaking-change This issue / pr will introduce a breaking change, when resolved / merged. feature-session

Comments

@aspnet-hello
Copy link

From @HaoK on Thursday, June 29, 2017 6:47:53 PM

Since the session middleware is using IOptions, we should mirror how we normally configure options... It should instead always use IOptions and apply the action to it afterwards (basically a PostPostConfigureOptions)

We should revisit any other middleware that are using this pattern and using IOptions

UseSession(new SessionOptions()) => UseSession(o => { })

Copied from original issue: aspnet/Session#174

@aspnet-hello
Copy link
Author

From @muratg on Tuesday, September 26, 2017 3:50:16 PM

@HaoK is this still a valid issue? Are we going to do this?

@aspnet-hello
Copy link
Author

From @HaoK on Tuesday, September 26, 2017 4:15:47 PM

Its a consistency issue, but I'm not sure this is something we could change in a minor release (breaking changes and all)

@aspnet-hello
Copy link
Author

From @Tratcher on Tuesday, September 26, 2017 4:16:50 PM

We could add the new one.

@aspnet-hello
Copy link
Author

From @HaoK on Tuesday, September 26, 2017 4:31:59 PM

Yeah we could add that across the board, UseXyz(o => { }) everywhere that's currently only taking UseXyz(new XyzOptions())

@muratg muratg added the breaking-change This issue / pr will introduce a breaking change, when resolved / merged. label Jan 10, 2019
@muratg
Copy link
Contributor

muratg commented Jan 10, 2019

I don't expect we'll make changes here.

@muratg muratg closed this as completed Jan 10, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares breaking-change This issue / pr will introduce a breaking change, when resolved / merged. feature-session
Projects
None yet
Development

No branches or pull requests

5 participants