mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-22 01:16:17 +08:00
migration v2 ing core 90%
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
using System.Application.Models;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
internal sealed class LinuxDesktopPlatformServiceImpl : IDesktopPlatformService
|
||||
{
|
||||
public void SetResizeMode(IntPtr hWnd, int value)
|
||||
{
|
||||
}
|
||||
|
||||
public string GetCommandLineArgs(Process process)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public string? GetFileName(TextReaderProvider provider)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\System.Common.CoreLib\Properties\AssemblyInfo.cs">
|
||||
<Link>Properties\AssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\System.Application.SteamTools.Client.Desktop\System.Application.SteamTools.Client.Desktop.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user