Skip to content

Commit 330be7a

Browse files
committed
testing tls
1 parent d06aadf commit 330be7a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/ADEffectiveAccess/GetADEffectiveAccessComand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public sealed class GetADEffectiveAccessComand : PSCmdlet, IDisposable
2121
// [ThreadStatic]
2222
// private static GuidResolver? _map;
2323

24-
private static GuidResolver? _map;
24+
private GuidResolver? _map;
2525

2626
[Parameter(
2727
Position = 0,

src/ADEffectiveAccess/GuidResolver.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44

55
namespace ADEffectiveAccess;
66

7-
public sealed class GuidResolver
7+
internal sealed class GuidResolver
88
{
9-
public Guid Id { get; } = Guid.NewGuid();
109
private readonly Dictionary<string?, Dictionary<Guid, string>> _map = [];
1110

1211
private Dictionary<Guid, string>? _current;
1312

1413
private static readonly RunspaceSpecificStorage<GuidResolver> _state = new(() => new());
1514

16-
internal static GuidResolver GetFromTLS() => _state.GetFromTLS();
17-
1815
private GuidResolver() { }
1916

17+
internal static GuidResolver GetFromTLS() => _state.GetFromTLS();
18+
2019
internal void SetCurrentContext(string? server, DirectoryEntryBuilder builder)
2120
{
2221
string path = server is null ? "RootDSE" : $"{server}/RootDSE";

src/ADEffectiveAccess/RunspaceSpecificStorage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ADEffectiveAccess;
77

88
internal class RunspaceSpecificStorage<T>(Func<T> factory)
99
{
10-
private readonly ConditionalWeakTable<Runspace, Lazy<T>> _map = new();
10+
internal readonly ConditionalWeakTable<Runspace, Lazy<T>> _map = new();
1111

1212
private readonly Func<T> _factory = factory;
1313

0 commit comments

Comments
 (0)