Skip to content

Commit

Permalink
Reduce amount of change to the LifetimeScope
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairjevans committed Dec 21, 2019
1 parent 132301d commit afc2dae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Autofac/Core/Lifetime/LifetimeScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,8 @@ public class LifetimeScope : Disposable, ISharingLifetimeScope, IServiceProvider
/// <param name="componentRegistry">Components used in the scope.</param>
/// <param name="parent">Parent scope.</param>
protected LifetimeScope(IComponentRegistry componentRegistry, LifetimeScope parent, object tag)
: this(componentRegistry, tag)
{
_sharedInstances[SelfRegistrationId] = this;
ComponentRegistry = componentRegistry ?? throw new ArgumentNullException(nameof(componentRegistry));
Tag = tag ?? throw new ArgumentNullException(nameof(tag));
parentScope = parent ?? throw new ArgumentNullException(nameof(parent));
RootLifetimeScope = parentScope.RootLifetimeScope;
}
Expand Down

0 comments on commit afc2dae

Please sign in to comment.