From 9c8125d333f5c36fd335e124494cf9fafa4c374b Mon Sep 17 00:00:00 2001 From: Eugene Sadovoi Date: Sun, 30 Sep 2018 16:05:33 -0400 Subject: [PATCH] Access IPolicyList via ref --- src/ContainerIntegration/AdditionalInterface.cs | 2 +- src/ContainerIntegration/DefaultInterceptor.cs | 2 +- src/ContainerIntegration/InterceptionBehaviorBase.cs | 2 +- src/ContainerIntegration/Interceptor.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ContainerIntegration/AdditionalInterface.cs b/src/ContainerIntegration/AdditionalInterface.cs index 00f0aec..f7d1b7a 100644 --- a/src/ContainerIntegration/AdditionalInterface.cs +++ b/src/ContainerIntegration/AdditionalInterface.cs @@ -46,7 +46,7 @@ namespace Unity.Interception.ContainerIntegration /// Type to register. /// Name used to resolve the type object. /// Policy list to add policies to. - public override void AddPolicies(Type serviceType, Type implementationType, string name, IPolicyList policies) + public override void AddPolicies(Type serviceType, Type implementationType, string name, ref TPolicyList policies) { AdditionalInterfacesPolicy policy = AdditionalInterfacesPolicy.GetOrCreate(policies, serviceType, name); diff --git a/src/ContainerIntegration/DefaultInterceptor.cs b/src/ContainerIntegration/DefaultInterceptor.cs index 9055e6e..098bab7 100644 --- a/src/ContainerIntegration/DefaultInterceptor.cs +++ b/src/ContainerIntegration/DefaultInterceptor.cs @@ -68,7 +68,7 @@ namespace Unity.Interception.ContainerIntegration /// Type of concrete type being registered. /// Name used to resolve the type object. /// Policy list to add policies to. - public override void AddPolicies(Type serviceType, Type implementationType, string name, IPolicyList policies) + public override void AddPolicies(Type serviceType, Type implementationType, string name, ref TPolicyList policies) { if (IsInstanceInterceptor) { diff --git a/src/ContainerIntegration/InterceptionBehaviorBase.cs b/src/ContainerIntegration/InterceptionBehaviorBase.cs index f0c7539..b4424d0 100644 --- a/src/ContainerIntegration/InterceptionBehaviorBase.cs +++ b/src/ContainerIntegration/InterceptionBehaviorBase.cs @@ -58,7 +58,7 @@ namespace Unity.Interception.ContainerIntegration /// Type to register. /// Name used to resolve the type object. /// Policy list to add policies to. - public override void AddPolicies(Type serviceType, Type implementationType, string name, IPolicyList policies) + public override void AddPolicies(Type serviceType, Type implementationType, string name, ref TPolicyList policies) { if (_explicitBehavior != null) { diff --git a/src/ContainerIntegration/Interceptor.cs b/src/ContainerIntegration/Interceptor.cs index ae690eb..ddef239 100644 --- a/src/ContainerIntegration/Interceptor.cs +++ b/src/ContainerIntegration/Interceptor.cs @@ -65,7 +65,7 @@ namespace Unity.Interception.ContainerIntegration /// Type to register. /// Name used to resolve the type object. /// Policy list to add policies to. - public override void AddPolicies(Type serviceType, Type implementationType, string name, IPolicyList policies) + public override void AddPolicies(Type serviceType, Type implementationType, string name, ref TPolicyList policies) { if (IsInstanceInterceptor) {