Skip to content

Commit 4f8cd50

Browse files
committed
(add missed demo output files)
1 parent 4957352 commit 4f8cd50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/Dapper.AOT.Test/Interceptors/CommandProperties.output.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public override void UpdateParameters(in global::Dapper.UnifiedCommand cmd, obje
213213
}
214214

215215
public override bool TryRecycle(global::System.Data.Common.DbCommand command) => TryRecycleThreadStatic(ref Storage, command, _cmdPool);
216-
private readonly DbCommandCache _cmdPool = new();
216+
private static readonly DbCommandCache _cmdPool = new();
217217
[global::System.ThreadStatic] // note this works correctly with ref
218218
private static global::System.Data.Common.DbCommand? Storage;
219219

@@ -272,7 +272,7 @@ public override void UpdateParameters(in global::Dapper.UnifiedCommand cmd, obje
272272
}
273273

274274
public override bool TryRecycle(global::System.Data.Common.DbCommand command) => TryRecycleThreadStatic(ref Storage, command, _cmdPool);
275-
private readonly DbCommandCache _cmdPool = new();
275+
private readonly DbCommandCache _cmdPool = new(); // note: per cache instance
276276
protected abstract ref global::System.Data.Common.DbCommand? Storage {get;}
277277

278278
internal sealed class Cached0 : CommandFactory1

test/Dapper.AOT.Test/Interceptors/CommandProperties.output.netfx.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public override void UpdateParameters(in global::Dapper.UnifiedCommand cmd, obje
213213
}
214214

215215
public override bool TryRecycle(global::System.Data.Common.DbCommand command) => TryRecycleThreadStatic(ref Storage, command, _cmdPool);
216-
private readonly DbCommandCache _cmdPool = new();
216+
private static readonly DbCommandCache _cmdPool = new();
217217
[global::System.ThreadStatic] // note this works correctly with ref
218218
private static global::System.Data.Common.DbCommand? Storage;
219219

@@ -272,7 +272,7 @@ public override void UpdateParameters(in global::Dapper.UnifiedCommand cmd, obje
272272
}
273273

274274
public override bool TryRecycle(global::System.Data.Common.DbCommand command) => TryRecycleThreadStatic(ref Storage, command, _cmdPool);
275-
private readonly DbCommandCache _cmdPool = new();
275+
private readonly DbCommandCache _cmdPool = new(); // note: per cache instance
276276
protected abstract ref global::System.Data.Common.DbCommand? Storage {get;}
277277

278278
internal sealed class Cached0 : CommandFactory1

0 commit comments

Comments
 (0)