Skip to content

Commit

Permalink
Releasing v3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ENikS committed Feb 13, 2018
1 parent 0d9a025 commit 5e5740f
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 57 deletions.
2 changes: 1 addition & 1 deletion package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>3.1.3</Version>
<Version>3.2.0</Version>
<PackageReleaseNotes>This package is distributed as .NET Standard 1.0, 2.0, .Net Core 1.0 and .NET 4.0, 4.5, 4.7</PackageReleaseNotes>
</PropertyGroup>

Expand Down
10 changes: 0 additions & 10 deletions src/Lifetime/ExternallyControlledLifetimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ public override void SetValue(object newValue, ILifetimeContainer container = nu
_value = new WeakReference(newValue);
}

/// <summary>
/// Remove the given object from backing store.
/// </summary>
/// <param name="container">Instance of container</param>
public override void RemoveValue(ILifetimeContainer container = null)
{
// DO NOTHING - we don't own this instance.
}


protected override LifetimeManager OnCreateLifetimeManager()
{
return new ExternallyControlledLifetimeManager();
Expand Down
6 changes: 6 additions & 0 deletions src/Lifetime/ILifetimeContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ namespace Unity.Lifetime
/// </remarks>
public interface ILifetimeContainer : IEnumerable<object>, IDisposable
{
/// <summary>
/// The container that this context is associated with.
/// </summary>
/// <value>The <see cref="IUnityContainer"/> object.</value>
IUnityContainer Container { get; }

/// <summary>
/// Gets the number of references in the lifetime container
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Lifetime/LifetimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ public abstract class LifetimeManager : ILifetimePolicy, ILifetimeFactoryPolicy
/// </summary>
/// <param name="newValue">The object being stored.</param>
/// <param name="container">The container this lifetime belongs to</param>
public abstract void SetValue(object newValue, ILifetimeContainer container = null);
public virtual void SetValue(object newValue, ILifetimeContainer container = null) { }

/// <summary>
/// Remove the given object from backing store.
/// <param name="container">The container this lifetime belongs to</param>
/// </summary>
public abstract void RemoveValue(ILifetimeContainer container = null);
public virtual void RemoveValue(ILifetimeContainer container = null) { }

#endregion

Expand Down
18 changes: 0 additions & 18 deletions src/Lifetime/PerResolveLifetimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@ public override object GetValue(ILifetimeContainer container = null)
return value;
}

/// <summary>
/// Stores the given value into backing store for retrieval later. In this class,
/// this is a noop, since it has special hooks down in the guts.
/// </summary>
/// <param name="container">Instance of container which owns the value</param>
/// <param name="newValue">The object being stored.</param>
public override void SetValue(object newValue, ILifetimeContainer container = null)
{
}

/// <summary>
/// Remove the given object from backing store. Noop in this class.
/// </summary>
/// <param name="container">Instance of container</param>
public override void RemoveValue(ILifetimeContainer container = null)
{
}

protected override LifetimeManager OnCreateLifetimeManager()
{
return new PerResolveLifetimeManager();
Expand Down
9 changes: 0 additions & 9 deletions src/Lifetime/PerThreadLifetimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ public override void SetValue(object newValue, ILifetimeContainer container = nu
_values[_key] = newValue;
}

/// <summary>
/// Remove the given object from backing store.
/// </summary>
/// <param name="container">Instance of container</param>
/// <remarks>Not implemented for this lifetime manager.</remarks>
public override void RemoveValue(ILifetimeContainer container = null)
{
}

private static void EnsureValues()
{
// no need for locking, values is TLS
Expand Down
17 changes: 0 additions & 17 deletions src/Lifetime/TransientLifetimeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@ public override object GetValue(ILifetimeContainer container = null)
return null;
}

/// <summary>
/// Stores the given value into backing store for retrieval later.
/// </summary>
/// <param name="newValue">The object being stored.</param>
/// <param name="container">Instance of container which owns the value</param>
public override void SetValue(object newValue, ILifetimeContainer container = null)
{
}

/// <summary>
/// Remove the given object from backing store.
/// <param name="container">Instance of container</param>
/// </summary>
public override void RemoveValue(ILifetimeContainer container = null)
{
}

protected override LifetimeManager OnCreateLifetimeManager()
{
return Instance;
Expand Down

0 comments on commit 5e5740f

Please sign in to comment.