migration v2 ing core 90%

This commit is contained in:
Aigio Liu
2021-02-24 18:10:37 +08:00
parent beb1dd645c
commit 3e3204412f
77 changed files with 1197 additions and 1168 deletions
@@ -0,0 +1,23 @@
using System;
using System.Application.Services;
using System.Application.Services.Implementation;
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddDesktopPlatformService(this IServiceCollection services)
{
if (DI.Platform == Platform.Linux)
{
services.AddSingleton<IDesktopPlatformService, LinuxDesktopPlatformServiceImpl>();
}
else
{
throw new PlatformNotSupportedException();
}
return services;
}
}
}