Skip to content

Commit

Permalink
Releasing 5.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ENikS committed Apr 24, 2019
1 parent 5afd229 commit b38bce2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>5.10.0</Version>
<Version>5.10.1</Version>
<PackageReleaseNotes>This package is compatible with Net Standard 2.0, Net Core 2.0, .NET 4.5, 4.6, and 4.7 frameworks.</PackageReleaseNotes>
</PropertyGroup>

Expand Down
10 changes: 8 additions & 2 deletions src/PolicyInjection/Pipeline/PipelineManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@


using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Reflection;
using Unity.Interception.Interceptors;
Expand All @@ -19,6 +20,9 @@ public class PipelineManager

private static readonly HandlerPipeline EmptyPipeline = new HandlerPipeline();

private static readonly ConcurrentDictionary<HandlerPipelineKey, MethodInfo> BaseMethodDefinitions =
new ConcurrentDictionary<HandlerPipelineKey, MethodInfo>();

/// <summary>
/// Retrieve the pipeline associated with the requested <paramref name="method"/>.
/// </summary>
Expand Down Expand Up @@ -74,13 +78,15 @@ private HandlerPipeline CreatePipeline(MethodInfo method, IEnumerable<ICallHandl
return _pipelines[key];
}

if (method.GetBaseDefinition() == method)
var baseMethodDefinition = BaseMethodDefinitions.GetOrAdd(key, k => method.GetBaseDefinition());

if (baseMethodDefinition == method)
{
_pipelines[key] = new HandlerPipeline(handlers);
return _pipelines[key];
}

var basePipeline = CreatePipeline(method.GetBaseDefinition(), handlers);
var basePipeline = CreatePipeline(baseMethodDefinition, handlers);
_pipelines[key] = basePipeline;
return basePipeline;
}
Expand Down

0 comments on commit b38bce2

Please sign in to comment.