mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
UI - Added remote management for bringing to foreground, restarting and shutting down UI - Simplified services namespaces
28 lines
766 B
C#
28 lines
766 B
C#
using System;
|
|
using EmbedIO.WebApi;
|
|
using Ninject;
|
|
|
|
namespace Artemis.Core.Services
|
|
{
|
|
internal class WebApiControllerRegistration<T> : WebApiControllerRegistration where T : WebApiController
|
|
{
|
|
public WebApiControllerRegistration(IKernel kernel) : base(typeof(T))
|
|
{
|
|
Factory = () => kernel.Get<T>();
|
|
}
|
|
|
|
public Func<T> Factory { get; set; }
|
|
public override object UntypedFactory => Factory;
|
|
}
|
|
|
|
internal abstract class WebApiControllerRegistration
|
|
{
|
|
protected WebApiControllerRegistration(Type controllerType)
|
|
{
|
|
ControllerType = controllerType;
|
|
}
|
|
|
|
public abstract object UntypedFactory { get; }
|
|
public Type ControllerType { get; set; }
|
|
}
|
|
} |