Skip to content

Commit 3baf993

Browse files
committed
Fixed #145
1 parent 96e20f2 commit 3baf993

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/Extensions/DiagnosticExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static class DiagnosticExtensions
1212
/// <para>This extension method adds <see cref="Diagnostic"/> extension to the
1313
/// container and enables extended validation for all container's operations.</para>
1414
/// <para>This method will only work if the calling code is built with DEBUG
15-
/// symbol defined. In other word in you building in Debug mode. Condigional
15+
/// symbol defined. In other word in you building in Debug mode. Conditional
1616
/// methods can not return any values, so fluent notation can not be used with
1717
/// this method.</para>
1818
/// </remarks>
@@ -39,7 +39,7 @@ public static void EnableDebugDiagnostic(this UnityContainer container)
3939
/// <remarks>
4040
/// <para>This extension method adds <see cref="Diagnostic"/> extension to the
4141
/// container and enables extended validation for all container's operations.</para>
42-
/// <para>This method works regardles of build mode. In other word, it will
42+
/// <para>This method works regardless of the build mode. In other word, it will
4343
/// always enable validation. This method could be used with fluent notation.</para>
4444
/// </remarks>
4545
/// <example>

src/Strategies/BuildPlanStrategy.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ public override bool RequiredToBuildType(IUnityContainer container, Type type, I
4141
public override void PreBuildUp(ref BuilderContext context)
4242
{
4343
// Get resolver if already created
44-
var resolver = context.Registration.Get<ResolveDelegate<BuilderContext>>();
44+
var resolver = context.Registration.Get<ResolveDelegate<BuilderContext>>() ?? (ResolveDelegate<BuilderContext>)(
45+
context.Get(context.Type, UnityContainer.All, typeof(ResolveDelegate<BuilderContext>)) ??
46+
GetGeneric(ref context, typeof(ResolveDelegate<BuilderContext>)));
47+
4548
if (null == resolver)
4649
{
4750
// Check if can create at all
@@ -59,9 +62,9 @@ public override void PreBuildUp(ref BuilderContext context)
5962

6063
// Get resolver factory
6164
var factory = context.Registration.Get<ResolveDelegateFactory>() ?? (ResolveDelegateFactory)(
62-
context.Get(context.Type, UnityContainer.All, typeof(ResolveDelegateFactory)) ??
63-
GetGeneric(ref context, typeof(ResolveDelegateFactory)) ??
64-
context.Get(null, null, typeof(ResolveDelegateFactory)));
65+
context.Get(context.Type, UnityContainer.All, typeof(ResolveDelegateFactory)) ??
66+
GetGeneric(ref context, typeof(ResolveDelegateFactory)) ??
67+
context.Get(null, null, typeof(ResolveDelegateFactory)));
6568

6669
// Create plan
6770
if (null != factory)

0 commit comments

Comments
 (0)