Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/IsExternalInit/IsExternalInit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@

#region License
// MIT License
//
//
// Copyright (c) Manuel Römer
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand All @@ -40,6 +40,7 @@
#nullable enable
#pragma warning disable

#if !NET5_0_OR_GREATER
namespace System.Runtime.CompilerServices
{
using global::System.Diagnostics;
Expand All @@ -60,6 +61,13 @@ internal static class IsExternalInit
{
}
}
#else
using System.Runtime.CompilerServices;

// Type-forward to the inbox IsExternalInit in order to maintain binary compatibility when
// multitargeting.
[assembly:TypeForwardedTo(typeof(IsExternalInit))]
#endif

#pragma warning restore
#nullable restore
Expand Down