Sigil-vNext 4.8.21

A fail-fast validation helper for .NET CIL generation.

There is a newer version of this package available.
See the version list below for details.
Install-Package Sigil-vNext -Version 4.8.21
dotnet add package Sigil-vNext --version 4.8.21
<PackageReference Include="Sigil-vNext" Version="4.8.21" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sigil-vNext --version 4.8.21
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sigil-vNext, 4.8.21"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Sigil

A fail-fast, validating helper for DynamicMethod and ILGenerator.

Usage

Sigil is a roughly 1-to-1 replacement for ILGenerator. Rather than calling ILGenerator.Emit(OpCode, ...), you call Emit<DelegateType>.OpCode(...).

Unlike ILGenerator, Sigil will fail as soon as an error is detected in the emitted IL.

Performance

Since Sigil performs a great deal of verification it is necessarily slower than using ILGenerator directly. That being said, Sigil should be adequately performant for most purposes.

Sigil may be too slow for practical use if you need:

  • More than ~100 labels and branches
  • Methods with more than ~10,000 instructions

Some costly optimizations can be disabled via the OptimizationOptions enumeration, and some validation steps can be deferred via the ValidationOptions enumeration.

Unsupported Operations

Fault blocks are not supported because of their rarity (there is no C# equivalent) and because they are forbidden in dynamic methods.

Sigil does not support Calli when disassembling delegates, as the C# compilers will not emit that instruction it is currently untestable.

Sigil

A fail-fast, validating helper for DynamicMethod and ILGenerator.

Usage

Sigil is a roughly 1-to-1 replacement for ILGenerator. Rather than calling ILGenerator.Emit(OpCode, ...), you call Emit<DelegateType>.OpCode(...).

Unlike ILGenerator, Sigil will fail as soon as an error is detected in the emitted IL.

Performance

Since Sigil performs a great deal of verification it is necessarily slower than using ILGenerator directly. That being said, Sigil should be adequately performant for most purposes.

Sigil may be too slow for practical use if you need:

  • More than ~100 labels and branches
  • Methods with more than ~10,000 instructions

Some costly optimizations can be disabled via the OptimizationOptions enumeration, and some validation steps can be deferred via the ValidationOptions enumeration.

Unsupported Operations

Fault blocks are not supported because of their rarity (there is no C# equivalent) and because they are forbidden in dynamic methods.

Sigil does not support Calli when disassembling delegates, as the C# compilers will not emit that instruction it is currently untestable.

Release Notes

Updates to support .NET 4.5.2, 4.6.2, 4.7.2, 4.8 and .NET Standard 1.5 and 2.0

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Sigil-vNext:

Package Downloads
Datadog.Trace.ClrProfiler.Managed
DEPRECATED. This package exists only for backwards compatibility. If your project references this package ("Datadog.Trace.ClrProfiler.Managed") or "Datadog.Trace.AspNet", you can remove them both. .NET Core applications no longer require any NuGet package to enable automatic instrumentation. Automatic instrumentation for both ASP.NET and ASP.NET Core is now automatically enabled. Users who need manual instrumentation should reference the "Datadog.Trace" package.
LightStep.Trace.ClrProfiler.Managed
Automatic instrumentation library used by .NET Tracer for Datadog APM. Requires separate native library that implements the CLR Profiling API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
4.8.41 511,160 7/8/2019
4.8.34 193 7/7/2019
4.8.21 175 7/5/2019