Metalama.Patterns.Immutability
2024.2.12-preview
Prefix Reserved
See the version list below for details.
dotnet add package Metalama.Patterns.Immutability --version 2024.2.12-preview
NuGet\Install-Package Metalama.Patterns.Immutability -Version 2024.2.12-preview
<PackageReference Include="Metalama.Patterns.Immutability" Version="2024.2.12-preview" />
paket add Metalama.Patterns.Immutability --version 2024.2.12-preview
#r "nuget: Metalama.Patterns.Immutability, 2024.2.12-preview"
// Install Metalama.Patterns.Immutability as a Cake Addin #addin nuget:?package=Metalama.Patterns.Immutability&version=2024.2.12-preview&prerelease // Install Metalama.Patterns.Immutability as a Cake Tool #tool nuget:?package=Metalama.Patterns.Immutability&version=2024.2.12-preview&prerelease
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 theConfigreImmutability
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
orDeep
.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 ofINamedType
to get theImmutabilityKind
of a given type.ImmutabilityConfigurationExtensions.ConfigureImmutability
is a fabric extension method to programmatically set theImmutabilityKind
of types.IImmutabilityClassifier
is an abstraction whose implementations can be passed toImmutabilityConfigurationExtensions.ConfigureImmutability
to dynamically return theImmutabilityKind
of a kind. It is useful when theImmutabilityKind
depends on type arguments.
Additional Documentation
- Conceptual documentation: TODO.
- API documentation: TODO.
Related Packages
Metalama.Patterns.Observability
relies onMetalama.Patterns.Immutability
to decide which method calls are supported in property getters.
Product | Versions 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. |
.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. |
-
.NETFramework 4.7.1
- Metalama.Framework (>= 2024.2.12-preview)
-
.NETStandard 2.0
- Metalama.Framework (>= 2024.2.12-preview)
-
net6.0
- Metalama.Framework (>= 2024.2.12-preview)
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.0.6-rc | 19 | 11/15/2024 |
2025.0.5-preview | 116 | 11/8/2024 |
2025.0.4-preview | 77 | 10/31/2024 |
2025.0.3-preview | 98 | 10/25/2024 |
2025.0.2-preview | 90 | 10/24/2024 |
2025.0.1-preview | 86 | 10/14/2024 |
2024.2.30 | 23 | 11/15/2024 |
2024.2.29 | 121 | 10/31/2024 |
2024.2.28 | 112 | 10/25/2024 |
2024.2.27 | 97 | 10/24/2024 |
2024.2.26 | 134 | 10/14/2024 |
2024.2.25 | 178 | 10/2/2024 |
2024.2.24 | 185 | 9/10/2024 |
2024.2.23 | 161 | 8/30/2024 |
2024.2.22 | 140 | 8/29/2024 |
2024.2.21 | 132 | 8/28/2024 |
2024.2.20 | 156 | 8/15/2024 |
2024.2.19 | 1,301 | 8/1/2024 |
2024.2.18 | 98 | 7/29/2024 |
2024.2.17-rc | 118 | 7/22/2024 |
2024.2.16-rc | 81 | 7/18/2024 |
2024.2.15-rc | 63 | 7/12/2024 |
2024.2.14-rc | 2,175 | 7/8/2024 |
2024.2.13-rc | 90 | 7/2/2024 |
2024.2.12-preview | 84 | 6/28/2024 |
2024.2.11-preview | 83 | 6/26/2024 |
2024.2.10-preview | 88 | 6/20/2024 |
2024.2.9-preview | 86 | 6/11/2024 |