mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
37 lines
1.4 KiB
C#
37 lines
1.4 KiB
C#
using Remotely.Desktop.Shared.Services;
|
|
using Remotely.Shared.Services;
|
|
using Microsoft.AspNetCore.SignalR.Client;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using Bitbound.SimpleMessenger;
|
|
using Desktop.Shared.Services;
|
|
using Remotely.Desktop.Shared.Abstractions;
|
|
|
|
namespace Remotely.Desktop.Shared.Startup;
|
|
|
|
public static class IServiceCollectionExtensions
|
|
{
|
|
internal static void AddRemoteControlXplat(
|
|
this IServiceCollection services)
|
|
{
|
|
services.AddLogging(builder =>
|
|
{
|
|
builder.AddConsole().AddDebug();
|
|
});
|
|
|
|
services.AddSingleton<ISystemTime, SystemTime>();
|
|
services.AddSingleton<IDesktopHubConnection, DesktopHubConnection>();
|
|
services.AddSingleton<IIdleTimer, IdleTimer>();
|
|
services.AddSingleton<IImageHelper, ImageHelper>();
|
|
services.AddSingleton<IChatHostService, ChatHostService>();
|
|
services.AddSingleton(s => WeakReferenceMessenger.Default);
|
|
services.AddSingleton<IDesktopEnvironment, DesktopEnvironment>();
|
|
services.AddSingleton<IDtoMessageHandler, DtoMessageHandler>();
|
|
services.AddSingleton<IBrandingProvider, BrandingProvider>();
|
|
services.AddSingleton<IAppState, AppState>();
|
|
services.AddSingleton<IViewerFactory, ViewerFactory>();
|
|
services.AddTransient<IScreenCaster, ScreenCaster>();
|
|
services.AddTransient<IHubConnectionBuilder>(s => new HubConnectionBuilder());
|
|
}
|
|
}
|