IsExternalInit 1.0.1

A source code only package which allows you to use C# 9's init and record features in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework by providing a polyfill for the IsExternalInit class.

This package does not contain any compiled binaries, but instead adds the IsExternalInit class as C# source code to your project. Because this code is compiled together with the rest of your code, the built binaries will not have a dependency on this package, meaning that you can perfectly use it for both libraries and applications.

The C# code is only included if you are targeting a framework version which does not support the IsExternalInit class. For example, if you create a library which multi-targets .NET Standard 2.0 and .NET 5.0, the IsExternalInit class is not provided in the .NET 5.0 compilation, because .NET 5.0 already provides support for the class by default.

Please see https://github.com/manuelroemer/IsExternalInit for additional information on how to use this package.

Install-Package IsExternalInit -Version 1.0.1
dotnet add package IsExternalInit --version 1.0.1
<PackageReference Include="IsExternalInit" Version="1.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IsExternalInit --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: IsExternalInit, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install IsExternalInit as a Cake Addin
#addin nuget:?package=IsExternalInit&version=1.0.1

// Install IsExternalInit as a Cake Tool
#tool nuget:?package=IsExternalInit&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

https://github.com/manuelroemer/IsExternalInit/blob/master/CHANGELOG.md

Dependencies

This package has no dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on IsExternalInit:

Package Downloads
bebop
The .NET runtime for Bebop, a schema-based binary serialization format.
Yoakke.Polyfill
A collection of .NET libraries to help compiler development.

GitHub repositories (11)

Showing the top 5 popular GitHub repositories that depend on IsExternalInit:

Repository Stars
dotnet/reactive
The Reactive Extensions for .NET
spectreconsole/spectre.console
A .NET library that makes it easier to create beautiful console applications.
neuecc/MessagePack-CSharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
morelinq/MoreLINQ
Extensions to LINQ to Objects
sebastienros/jint
Javascript Interpreter for .NET

Version History

Version Downloads Last updated
1.0.1 24,747 6/15/2021
1.0.0 73,808 11/21/2020