Metalama.Patterns.Immutability 2025.1.2-preview

Prefix Reserved
This is a prerelease version of Metalama.Patterns.Immutability.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Metalama.Patterns.Immutability --version 2025.1.2-preview
                    
NuGet\Install-Package Metalama.Patterns.Immutability -Version 2025.1.2-preview
                    
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="2025.1.2-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Metalama.Patterns.Immutability" Version="2025.1.2-preview" />
                    
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 2025.1.2-preview
                    
#r "nuget: Metalama.Patterns.Immutability, 2025.1.2-preview"
                    
#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.
#addin nuget:?package=Metalama.Patterns.Immutability&version=2025.1.2-preview&prerelease
                    
Install Metalama.Patterns.Immutability as a Cake Addin
#tool nuget:?package=Metalama.Patterns.Immutability&version=2025.1.2-preview&prerelease
                    
Install Metalama.Patterns.Immutability 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 is compatible.  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 was computed.  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. 
.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 is compatible.  net472 was computed.  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
2025.1.4-rc 219 10 days ago
2025.1.3-rc 230 16 days ago
2025.1.2-preview 214 25 days ago
2025.1.1-preview 184 a month ago
2025.0.10 201 25 days ago
2025.0.9 288 2 months ago
2025.0.8 364 4 months ago
2025.0.7-rc 218 5 months ago
2025.0.6-rc 211 5 months ago
2025.0.5-preview 140 6 months ago
2025.0.4-preview 99 6 months ago
2025.0.3-preview 117 6 months ago
2025.0.2-preview 107 6 months ago
2025.0.1-preview 101 6 months ago
2024.2.32 224 2 months ago
2024.2.31 172 5 months ago
2024.2.30 165 5 months ago
2024.2.29 147 6 months ago
2024.2.28 139 6 months ago
2024.2.27 119 6 months ago
2024.2.26 196 6 months ago
2024.2.25 226 7 months ago
2024.2.24 207 7 months ago
2024.2.23 178 8 months ago
2024.2.22 156 8 months ago
2024.2.21 147 8 months ago
2024.2.20 171 8 months ago
2024.2.19 1,375 9 months ago
2024.2.18 131 9 months ago
2024.2.17-rc 129 9 months ago
2024.2.16-rc 94 9 months ago
2024.2.15-rc 75 9 months ago
2024.2.14-rc 2,216 10 months ago
2024.2.13-rc 101 10 months ago
2024.2.12-preview 96 10 months ago
2024.2.11-preview 95 10 months ago
2024.2.10-preview 99 6/20/2024
2024.2.9-preview 96 6/11/2024