Metalama.Patterns.Immutability 2026.0.16

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Metalama.Patterns.Immutability --version 2026.0.16
                    
NuGet\Install-Package Metalama.Patterns.Immutability -Version 2026.0.16
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Metalama.Patterns.Immutability" Version="2026.0.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Metalama.Patterns.Immutability" Version="2026.0.16" />
                    
Directory.Packages.props
<PackageReference Include="Metalama.Patterns.Immutability" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Metalama.Patterns.Immutability --version 2026.0.16
                    
#r "nuget: Metalama.Patterns.Immutability, 2026.0.16"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Metalama.Patterns.Immutability@2026.0.16
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Metalama.Patterns.Immutability&version=2026.0.16
                    
Install as a Cake Addin
#tool nuget:?package=Metalama.Patterns.Immutability&version=2026.0.16
                    
Install as a Cake Tool

Metalama Logo

About

The Metalama.Patterns.Immutability implements the concept of immutable type, i.e. types whose value cannot be changed after they have been created. Other packages, such as Metalama.Patterns.Observability, can then rely on this concept to achieve a better understanding of the code.

Key Features

  • You can mark types as immutable using the [Immutable] custom attribute or the ConfigreImmutability fabric extension warning.
  • Concept of shallow or deep immutability.
  • The [Immutable] aspect reports warnings if some fields or properties are not mutable.

Main Types

The primary types in this package are:

  • ImmutabilityKind represents the kind of immutability of a type, i.e. None, Shallow or Deep.
  • ImmutableAttribute is an aspect that marks a type as immutable and reports warnings if some fields or properties are mutable.
  • ImmutabilityExtensions.GetImmutability is an extension of INamedType to get the ImmutabilityKind of a given type.
  • ImmutabilityConfigurationExtensions.ConfigureImmutability is a fabric extension method to programmatically set the ImmutabilityKind of types.
  • IImmutabilityClassifier is an abstraction whose implementations can be passed to ImmutabilityConfigurationExtensions.ConfigureImmutability to dynamically return the ImmutabilityKind of a kind. It is useful when the ImmutabilityKind depends on type arguments.

Additional Documentation

  • Metalama.Patterns.Observability relies on Metalama.Patterns.Immutability to decide which method calls are supported in property getters.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Metalama.Patterns.Immutability:

Package Downloads
Metalama.Patterns.Observability

Implements the Observable pattern and the INotifyPropertyChanged interface with a single [Observable] attribute thanks to Metalama. Supports both automatic and explicit properties and child objects.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.1.0-preview 21 2/1/2026
2026.0.16 262 1/24/2026
2026.0.15 382 1/14/2026
2026.0.14 125 1/13/2026
2026.0.13 130 1/12/2026
2026.0.12 147 1/9/2026
2026.0.11 219 1/5/2026
2026.0.10-rc 448 12/19/2025
2026.0.9-rc 275 12/12/2025
2026.0.8-rc 458 12/9/2025
2026.0.7-rc 278 12/4/2025
2026.0.6-rc 241 11/28/2025
2026.0.5-preview 546 11/12/2025
2026.0.4-preview 169 11/8/2025
2026.0.3-preview 334 10/30/2025
2026.0.2-preview 208 10/7/2025
2026.0.1-preview 147 10/4/2025
2025.2.5-rc 209 10/7/2025
2025.2.4-rc 216 10/1/2025
2025.2.2-preview 751 9/19/2025
2025.2.1-preview 255 9/9/2025
2025.1.17 586 12/9/2025
2025.1.16 479 10/22/2025
2025.1.15 431 10/7/2025
2025.1.14 227 9/30/2025
2025.1.13 297 9/5/2025
2025.1.12 496 8/7/2025
2025.1.11 645 7/23/2025
2025.1.10 522 7/3/2025
2025.1.9 684 5/29/2025
2025.1.8 299 5/26/2025
2025.1.7 304 5/22/2025
2025.1.6 341 5/15/2025
2025.1.5 292 5/2/2025
2025.1.4-rc 378 4/15/2025
2025.1.3-rc 310 4/9/2025
2025.1.2-preview 286 4/1/2025
2025.1.1-preview 250 3/18/2025
2025.0.12 258 5/22/2025
2025.0.11 234 5/2/2025
2025.0.10 316 3/31/2025
2025.0.9 404 3/7/2025
2025.0.8 442 1/6/2025
2025.0.7-rc 286 12/6/2024
2025.0.6-rc 286 11/15/2024
2025.0.5-preview 214 11/8/2024
2025.0.4-preview 208 10/31/2024
2025.0.3-preview 193 10/25/2024
2025.0.2-preview 175 10/24/2024
2025.0.1-preview 198 10/14/2024
2024.2.32 340 3/7/2025
2024.2.31 245 12/6/2024
2024.2.30 244 11/15/2024
2024.2.29 220 10/31/2024
2024.2.28 208 10/25/2024
2024.2.27 186 10/24/2024
2024.2.26 324 10/14/2024
2024.2.25 338 10/2/2024
2024.2.24 328 9/10/2024
2024.2.23 277 8/30/2024
2024.2.22 223 8/29/2024
2024.2.21 243 8/28/2024
2024.2.20 239 8/15/2024
2024.2.19 1,520 8/1/2024
2024.2.18 284 7/29/2024
2024.2.17-rc 241 7/22/2024
2024.2.16-rc 159 7/18/2024
2024.2.15-rc 143 7/12/2024
2024.2.14-rc 2,511 7/8/2024
2024.2.13-rc 171 7/2/2024
2024.2.12-preview 166 6/28/2024
2024.2.11-preview 170 6/26/2024
2024.2.10-preview 177 6/20/2024
2024.2.9-preview 164 6/11/2024