Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Captive Dependency 2
public class SingletonDependency
{
private readonly ScopedDependency scopedDepdendency;
// Should this blow up??
public SingletonDependency(ScopedDependency transitiveDependecy)
{
this.scopedDepdendency = transitiveDependecy;
}
public int GetNextCounter()
{
return scopedDepdendency.GetNextCounter();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment