Skip to content

Commit

Permalink
Improve ordering for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
generik0 committed Dec 10, 2020
1 parent bdf3507 commit 32ce9c5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ internal static ExtensionContainerScope Current
get => current.Value ?? throw new InvalidOperationException("No scope available");
set => current.Value = value;
}
public static string TransientMarker = "Transient";
protected static readonly AsyncLocal<ExtensionContainerScope> current = new AsyncLocal<ExtensionContainerScope>();

public static string TransientMarker = "Transient";
private readonly ExtensionContainerScope parent;
private readonly IScopeCache scopeCache;

protected ExtensionContainerScope(ExtensionContainerScope parent)
{
scopeCache = new ScopeCache();
RootScope = parent?.RootScope ?? this as ExtensionContainerRootScope;
this.parent = parent;
current.Value = this;
this.parent = parent;
RootScope = parent?.RootScope ?? this as ExtensionContainerRootScope;
}

internal ExtensionContainerRootScope RootScope { get; }
Expand Down

0 comments on commit 32ce9c5

Please sign in to comment.