Skip to content

Commit bc14211

Browse files
committed
Added IRequireBuildUpPolicy
1 parent a5bf896 commit bc14211

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

src/Builder/UnityBuildStage.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ public enum UnityBuildStage
1313
/// </summary>
1414
Setup,
1515

16-
/// <summary>
17-
/// Second stage. Type mapping occurs here.
18-
/// </summary>
19-
TypeMapping,
20-
2116
/// <summary>
2217
/// Third stage. lifetime managers are checked here,
2318
/// and if they're available the rest of the pipeline is skipped.
2419
/// </summary>
2520
Lifetime,
2621

22+
/// <summary>
23+
/// Second stage. Type mapping occurs here.
24+
/// </summary>
25+
TypeMapping,
26+
2727
/// <summary>
2828
/// Fourth stage. Reflection over constructors, properties, etc. is
2929
/// performed here.

src/Lifetime/PerResolveLifetimeManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
22

3+
using Unity.Policy;
4+
35
namespace Unity.Lifetime
46
{
57
/// <summary>
68
/// This is a custom lifetime manager that acts like <see cref="TransientLifetimeManager"/>,
79
/// but also provides a signal to the default build plan, marking the type so that
810
/// instances are reused across the build up object graph.
911
/// </summary>
10-
public class PerResolveLifetimeManager : LifetimeManager
12+
public class PerResolveLifetimeManager : LifetimeManager, IRequireBuildUpPolicy
1113
{
1214
protected object value;
1315

src/Policy/IRequireBuildUpPolicy.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Unity.Policy
6+
{
7+
public interface IRequireBuildUpPolicy
8+
{
9+
}
10+
}

0 commit comments

Comments
 (0)