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.Windows)
{
services.AddSingleton();
services.AddSingleton();
}
else
{
throw new PlatformNotSupportedException();
}
return services;
}
}
}