mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Core - Refactor service registration pt 2
This commit is contained in:
parent
f2ef657d00
commit
64decaf0c2
@ -13,7 +13,7 @@ namespace Artemis.Core.DryIoc;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class CoreContainerExtensions
|
public static class ContainerExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Registers core services into the container.
|
/// Registers core services into the container.
|
||||||
|
|||||||
@ -7,7 +7,7 @@ namespace Artemis.UI.Shared.DryIoc;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class UIContainerExtensions
|
public static class ContainerExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Registers shared UI services into the container.
|
/// Registers shared UI services into the container.
|
||||||
|
|||||||
@ -12,8 +12,6 @@ using Artemis.UI.Shared.DataModelPicker;
|
|||||||
using Artemis.UI.Shared.DryIoc;
|
using Artemis.UI.Shared.DryIoc;
|
||||||
using Artemis.UI.Shared.Services;
|
using Artemis.UI.Shared.Services;
|
||||||
using Artemis.VisualScripting.DryIoc;
|
using Artemis.VisualScripting.DryIoc;
|
||||||
using Artemis.WebClient.Updating;
|
|
||||||
using Artemis.WebClient.Updating.DryIoc;
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
@ -44,7 +42,6 @@ public static class ArtemisBootstrapper
|
|||||||
_container.RegisterCore();
|
_container.RegisterCore();
|
||||||
_container.RegisterUI();
|
_container.RegisterUI();
|
||||||
_container.RegisterSharedUI();
|
_container.RegisterSharedUI();
|
||||||
_container.RegisterUpdatingClient();
|
|
||||||
_container.RegisterNoStringEvaluating();
|
_container.RegisterNoStringEvaluating();
|
||||||
configureServices?.Invoke(_container);
|
configureServices?.Invoke(_container);
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ namespace Artemis.UI.DryIoc;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class UIContainerExtensions
|
public static class ContainerExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Registers UI services into the container.
|
/// Registers UI services into the container.
|
||||||
@ -24,7 +24,7 @@ public static class UIContainerExtensions
|
|||||||
/// <param name="container">The builder building the current container</param>
|
/// <param name="container">The builder building the current container</param>
|
||||||
public static void RegisterUI(this IContainer container)
|
public static void RegisterUI(this IContainer container)
|
||||||
{
|
{
|
||||||
Assembly[] thisAssembly = {typeof(UIContainerExtensions).Assembly};
|
Assembly[] thisAssembly = {typeof(ContainerExtensions).Assembly};
|
||||||
|
|
||||||
container.RegisterInstance(new AssetLoader(), IfAlreadyRegistered.Throw);
|
container.RegisterInstance(new AssetLoader(), IfAlreadyRegistered.Throw);
|
||||||
container.Register<IAssetLoader, AssetLoader>(Reuse.Singleton);
|
container.Register<IAssetLoader, AssetLoader>(Reuse.Singleton);
|
||||||
|
|||||||
@ -13,7 +13,7 @@ namespace Artemis.VisualScripting.DryIoc;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
/// Provides an extension method to register services onto a DryIoc <see cref="IContainer"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class UIContainerExtensions
|
public static class ContainerExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Registers NoStringEvaluating services into the container.
|
/// Registers NoStringEvaluating services into the container.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user