Skip to content

Commit

Permalink
Merge pull request #6 from mackysoft/feature/vcontainer-register-method
Browse files Browse the repository at this point in the history
Add `IContainerBuilder.RegisterSceneLifecycle` method
  • Loading branch information
mackysoft committed Oct 30, 2023
2 parents 5da9df2 + 741724b commit cb3628f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#if ENABLE_NAVIGATHENA_VCONTAINER
using System.Runtime.CompilerServices;
using VContainer;

namespace MackySoft.Navigathena.SceneManagement.VContainer
{
public static class ContainerBuilderExtensions
{

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static RegistrationBuilder RegisterSceneLifecycle<TSceneLifecycle> (this IContainerBuilder builder) where TSceneLifecycle : ISceneLifecycle
{
return builder.Register<ISceneLifecycle, TSceneLifecycle>(Lifetime.Singleton);
}
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cb3628f

Please sign in to comment.