auto constructor

This commit is contained in:
qhy040404
2024-05-31 22:16:36 +08:00
parent 86b04bb5a3
commit 72e163f613

View File

@@ -2,21 +2,16 @@
// Licensed under the MIT license.
using Microsoft.Windows.AppLifecycle;
using System.IO.Hashing;
using System.IO.Pipes;
namespace Snap.Hutao.Core.LifeCycle.InterProcess;
[Injection(InjectAs.Singleton)]
internal sealed class PrivateNamedPipeClient : IDisposable
[ConstructorGenerated]
internal sealed partial class PrivateNamedPipeClient : IDisposable
{
private readonly RuntimeOptions runtimeOptions;
private readonly NamedPipeClientStream clientStream = new(".", "Snap.Hutao.PrivateNamedPipe", PipeDirection.InOut, PipeOptions.Asynchronous | PipeOptions.WriteThrough);
public PrivateNamedPipeClient(IServiceProvider serviceProvider)
{
runtimeOptions = serviceProvider.GetRequiredService<RuntimeOptions>();
}
private readonly RuntimeOptions runtimeOptions;
public unsafe bool TryRedirectActivationTo(AppActivationArguments args)
{