Skip to content

Commit b38bce2

Browse files
committed
Releasing 5.10.1
1 parent 5afd229 commit b38bce2

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

package.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<Version>5.10.0</Version>
4+
<Version>5.10.1</Version>
55
<PackageReleaseNotes>This package is compatible with Net Standard 2.0, Net Core 2.0, .NET 4.5, 4.6, and 4.7 frameworks.</PackageReleaseNotes>
66
</PropertyGroup>
77

src/PolicyInjection/Pipeline/PipelineManager.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22

3+
using System.Collections.Concurrent;
34
using System.Collections.Generic;
45
using System.Reflection;
56
using Unity.Interception.Interceptors;
@@ -19,6 +20,9 @@ public class PipelineManager
1920

2021
private static readonly HandlerPipeline EmptyPipeline = new HandlerPipeline();
2122

23+
private static readonly ConcurrentDictionary<HandlerPipelineKey, MethodInfo> BaseMethodDefinitions =
24+
new ConcurrentDictionary<HandlerPipelineKey, MethodInfo>();
25+
2226
/// <summary>
2327
/// Retrieve the pipeline associated with the requested <paramref name="method"/>.
2428
/// </summary>
@@ -74,13 +78,15 @@ private HandlerPipeline CreatePipeline(MethodInfo method, IEnumerable<ICallHandl
7478
return _pipelines[key];
7579
}
7680

77-
if (method.GetBaseDefinition() == method)
81+
var baseMethodDefinition = BaseMethodDefinitions.GetOrAdd(key, k => method.GetBaseDefinition());
82+
83+
if (baseMethodDefinition == method)
7884
{
7985
_pipelines[key] = new HandlerPipeline(handlers);
8086
return _pipelines[key];
8187
}
8288

83-
var basePipeline = CreatePipeline(method.GetBaseDefinition(), handlers);
89+
var basePipeline = CreatePipeline(baseMethodDefinition, handlers);
8490
_pipelines[key] = basePipeline;
8591
return basePipeline;
8692
}

0 commit comments

Comments
 (0)