Skip to content

Commit 224f95c

Browse files
committed
Fix trimming issue on mobile targets
1 parent ccc9d4c commit 224f95c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/PosixSignalRegistration.PlatformNotSupported.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
5+
46
namespace System.Runtime.InteropServices
57
{
68
public sealed partial class PosixSignalRegistration
79
{
810
private PosixSignalRegistration() { }
911

12+
[DynamicDependency("#ctor")] // Prevent the private ctor and the IDisposable implementation from getting linked away
1013
public static partial PosixSignalRegistration Create(PosixSignal signal, Action<PosixSignalContext> handler)
1114
{
1215
if (handler is null)

0 commit comments

Comments
 (0)