Skip to content

Commit 1f9dbd5

Browse files
committed
Updating references to Abstractions.3.0.0 and Container.5.5.0
1 parent ef8f6ba commit 1f9dbd5

4 files changed

Lines changed: 13 additions & 9 deletions

File tree

package.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<PropertyGroup>
9-
<UnityAbstractionsVersion>2.*</UnityAbstractionsVersion>
9+
<UnityAbstractionsVersion>3.*</UnityAbstractionsVersion>
1010
<UnityContainerVersion>5.*</UnityContainerVersion>
1111
</PropertyGroup>
1212

src/ContainerIntegration/ObjectBuilder/InstanceInterceptionStrategy.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public class InstanceInterceptionStrategy : BuilderStrategy
2323
/// phase and executes in reverse order from the PreBuildUp calls.
2424
/// </summary>
2525
/// <param name="context">Context of the build operation.</param>
26-
public override void PostBuildUp(IBuilderContext context)
26+
/// <param name="pre"></param>
27+
public override void PostBuildUp(IBuilderContext context, object pre = null)
2728
{
2829
// If it's already been intercepted, don't do it again.
2930
if ((context ?? throw new ArgumentNullException(nameof(context))).Existing is IInterceptingProxy)

src/ContainerIntegration/ObjectBuilder/TypeInterceptionStrategy.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ public class TypeInterceptionStrategy : BuilderStrategy
2929
/// <remarks>In this class, PreBuildUp is responsible for figuring out if the
3030
/// class is proxyable, and if so, replacing it with a proxy class.</remarks>
3131
/// <param name="context">Context of the build operation.</param>
32-
public override void PreBuildUp(IBuilderContext context)
32+
public override object PreBuildUp(IBuilderContext context)
3333
{
3434
if ((context ?? throw new ArgumentNullException(nameof(context))).Existing != null)
3535
{
36-
return;
36+
return null;
3737
}
3838

3939
Type typeToBuild = context.BuildKey.Type;
4040

4141
var interceptionPolicy = FindInterceptionPolicy<ITypeInterceptionPolicy>(context);
4242
if (interceptionPolicy == null)
4343
{
44-
return;
44+
return null;
4545
}
4646

4747
var interceptor = interceptionPolicy.GetInterceptor(context);
4848
if (!interceptor.CanIntercept(typeToBuild))
4949
{
50-
return;
50+
return null;
5151
}
5252

5353
var interceptionBehaviorsPolicy = FindInterceptionPolicy<IInterceptionBehaviorsPolicy>(context);
@@ -80,6 +80,8 @@ public override void PreBuildUp(IBuilderContext context)
8080
interceptor.CreateProxyType(typeToBuild, allAdditionalInterfaces);
8181

8282
DerivedTypeConstructorSelectorPolicy.SetPolicyForInterceptingType(context, interceptingType);
83+
84+
return null;
8385
}
8486

8587
/// <summary>
@@ -90,7 +92,8 @@ public override void PreBuildUp(IBuilderContext context)
9092
/// <remarks>In this class, PostBuildUp checks to see if the object was proxyable,
9193
/// and if it was, wires up the handlers.</remarks>
9294
/// <param name="context">Context of the build operation.</param>
93-
public override void PostBuildUp(IBuilderContext context)
95+
/// <param name="pre"></param>
96+
public override void PostBuildUp(IBuilderContext context, object pre = null)
9497
{
9598
IInterceptingProxy proxy =
9699
(context ?? throw new ArgumentNullException(nameof(context))).Existing as IInterceptingProxy;
@@ -163,7 +166,7 @@ private static SelectedConstructor FindNewConstructor(SelectedConstructor origin
163166

164167
SelectedConstructor newConstructor = new SelectedConstructor(newConstructorInfo);
165168

166-
foreach (IDependencyResolverPolicy resolver in originalConstructor.GetParameterResolvers())
169+
foreach (IResolverPolicy resolver in originalConstructor.GetParameterResolvers())
167170
{
168171
newConstructor.AddParameterResolver(resolver);
169172
}

tests/TestSupport/MockBuilderContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void AddResolverOverrides(IEnumerable<ResolverOverride> newOverrides)
9696
resolverOverrides.AddRange(newOverrides);
9797
}
9898

99-
public IDependencyResolverPolicy GetOverriddenResolver(Type dependencyType)
99+
public IResolverPolicy GetOverriddenResolver(Type dependencyType)
100100
{
101101
return resolverOverrides.GetResolver(this, dependencyType);
102102
}

0 commit comments

Comments
 (0)