Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

OptionsSnapshot should always be recreated per request - #164

Closed
HaoK wants to merge 3 commits into
devfrom
haok/snapshot
Closed

HaoK wants to merge 3 commits into
devfrom
haok/snapshot

Conversation

@HaoK

@HaoK HaoK commented Jan 31, 2017

Copy link
Copy Markdown
Member

Fixes #160

Unblocks using IConfigureOptions which have scoped dependencies like db context

cc @divega @glennc

}
/// <param name="setups">The configuration actions to run.</param>
public OptionsSnapshot(IEnumerable<IConfigureOptions<TOptions>> setups) : base(setups)
{ }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Slight behavior difference with this change, previously we would eager cache .Value in the ctor, now we are lazy and don't cache until the first time .Value is used... We should be intentional with how this works I guess...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

discussed with @divega and we will just have OptionsManager implement both interfaces

@HaoK

HaoK commented Feb 13, 2017

Copy link
Copy Markdown
Member Author

c68ede3

@HaoK HaoK closed this Feb 13, 2017
@HaoK HaoK added this to the 2.0.0 milestone Feb 13, 2017
@HaoK HaoK self-assigned this Feb 13, 2017
@HaoK HaoK changed the title OptionsSnapshot always created per scope OptionsSnapshot should always be recreated per request Feb 13, 2017
@natemcmaster
natemcmaster deleted the haok/snapshot branch November 16, 2017 05:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants