Files
SteamTools/System.Application.SteamTools.Client.Desktop.Platform.Mac/ServiceCollectionExtensions.cs
T
Aigio Liu f483a5dcba 优化 MSBuild 在 Release 时 不生成PDB
新增平台架构(win/mac/linux)
优化 发布配置
2021-02-22 01:02:19 +08:00

23 lines
688 B
C#

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