using System.Reflection; using Artemis.UI.Shared.Services; using DryIoc; namespace Artemis.UI.Shared.DryIoc; /// /// Provides an extension method to register services onto a DryIoc . /// public static class UIContainerExtensions { /// /// Registers shared UI services into the container. /// /// The builder building the current container public static void RegisterSharedUI(this IContainer container) { Assembly artemisShared = typeof(IArtemisSharedUIService).GetAssembly(); container.RegisterMany(new[] { artemisShared }, type => type.IsAssignableTo(), Reuse.Singleton); } }