From f5d1ff0b421b78644d2391f7529a40c2cbda597f Mon Sep 17 00:00:00 2001 From: Eugene Sadovoi Date: Sat, 20 May 2023 15:02:06 -0700 Subject: [PATCH] v6 build fixes --- Container.Version.6.0.x.csproj | 2 ++ Container/Extension/Extensions/SpyExtension.cs | 2 +- Lifetime/Data/LifetimeContainer.cs | 12 +----------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Container.Version.6.0.x.csproj b/Container.Version.6.0.x.csproj index 363cefa..cd8c99b 100644 --- a/Container.Version.6.0.x.csproj +++ b/Container.Version.6.0.x.csproj @@ -33,6 +33,8 @@ + + diff --git a/Container/Extension/Extensions/SpyExtension.cs b/Container/Extension/Extensions/SpyExtension.cs index 877a723..14b6ca9 100644 --- a/Container/Extension/Extensions/SpyExtension.cs +++ b/Container/Extension/Extensions/SpyExtension.cs @@ -87,7 +87,7 @@ namespace Regression.Container protected override void Initialize() { - Context.Strategies.Add(this._strategy, this._stage); + Context.Strategies.Add(this._strategy, (UnityBuildStage)this._stage); if (_policy != null) Context.Policies.Set(null, _policyType, _policy); diff --git a/Lifetime/Data/LifetimeContainer.cs b/Lifetime/Data/LifetimeContainer.cs index f007287..c4169ba 100644 --- a/Lifetime/Data/LifetimeContainer.cs +++ b/Lifetime/Data/LifetimeContainer.cs @@ -10,7 +10,7 @@ using Unity.Lifetime; namespace Unity.Storage { - public class LifetimeContainer : List, ILifetimeContainer + public class LifetimeContainer : List #if UNITY_V5 || UNITY_V6 , ILifetimeContainer #endif @@ -40,15 +40,5 @@ namespace Unity.Storage if (item is IDisposable disposable) base.Remove(disposable); } - - void ILifetimeContainer.Remove(IDisposable item) - { - Remove(item); - } - -#if UNITY_V5 || UNITY_V6 - IEnumerator IEnumerable.GetEnumerator() - => base.GetEnumerator(); -#endif } }