Skip to content

Commit

Permalink
Added IRequireBuildUpPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
ENikS committed Nov 17, 2017
1 parent a5bf896 commit bc14211
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Builder/UnityBuildStage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ public enum UnityBuildStage
/// </summary>
Setup,

/// <summary>
/// Second stage. Type mapping occurs here.
/// </summary>
TypeMapping,

/// <summary>
/// Third stage. lifetime managers are checked here,
/// and if they're available the rest of the pipeline is skipped.
/// </summary>
Lifetime,

/// <summary>
/// Second stage. Type mapping occurs here.
/// </summary>
TypeMapping,

/// <summary>
/// Fourth stage. Reflection over constructors, properties, etc. is
/// performed here.
Expand Down
4 changes: 3 additions & 1 deletion src/Lifetime/PerResolveLifetimeManager.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

using Unity.Policy;

namespace Unity.Lifetime
{
/// <summary>
/// This is a custom lifetime manager that acts like <see cref="TransientLifetimeManager"/>,
/// but also provides a signal to the default build plan, marking the type so that
/// instances are reused across the build up object graph.
/// </summary>
public class PerResolveLifetimeManager : LifetimeManager
public class PerResolveLifetimeManager : LifetimeManager, IRequireBuildUpPolicy
{
protected object value;

Expand Down
10 changes: 10 additions & 0 deletions src/Policy/IRequireBuildUpPolicy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Unity.Policy
{
public interface IRequireBuildUpPolicy
{
}
}

0 comments on commit bc14211

Please sign in to comment.