mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
ColorGradient - Fixed GetColor returning the first stop if position was after the last stop
25 lines
869 B
C#
25 lines
869 B
C#
using System.Reflection;
|
|
using Artemis.UI.Shared.Routing;
|
|
using Artemis.UI.Shared.Services;
|
|
using DryIoc;
|
|
|
|
namespace Artemis.UI.Shared.DryIoc;
|
|
|
|
/// <summary>
|
|
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
|
/// </summary>
|
|
public static class ContainerExtensions
|
|
{
|
|
/// <summary>
|
|
/// Registers shared UI services into the container.
|
|
/// </summary>
|
|
/// <param name="container">The builder building the current container</param>
|
|
public static void RegisterSharedUI(this IContainer container)
|
|
{
|
|
container.Register<IRouter, Router>(Reuse.Singleton);
|
|
Assembly artemisShared = typeof(IArtemisSharedUIService).GetAssembly();
|
|
container.RegisterMany(new[] {artemisShared}, type => type.IsAssignableTo<IArtemisSharedUIService>(), Reuse.Singleton);
|
|
|
|
UI.Locator = container;
|
|
}
|
|
} |