Maris.ComponentModel.Annotations
2.1.0-Beta3
Prefix Reserved
See the version list below for details.
dotnet add package Maris.ComponentModel.Annotations --version 2.1.0-Beta3
NuGet\Install-Package Maris.ComponentModel.Annotations -Version 2.1.0-Beta3
<PackageReference Include="Maris.ComponentModel.Annotations" Version="2.1.0-Beta3" />
<PackageVersion Include="Maris.ComponentModel.Annotations" Version="2.1.0-Beta3" />
<PackageReference Include="Maris.ComponentModel.Annotations" />
paket add Maris.ComponentModel.Annotations --version 2.1.0-Beta3
#r "nuget: Maris.ComponentModel.Annotations, 2.1.0-Beta3"
#:package Maris.ComponentModel.Annotations@2.1.0-Beta3
#addin nuget:?package=Maris.ComponentModel.Annotations&version=2.1.0-Beta3&prerelease
#tool nuget:?package=Maris.ComponentModel.Annotations&version=2.1.0-Beta3&prerelease
Maris.ComponentModel.Annotations
Maris.ComponentModel.Annotations provides additional functionality for System.ComponentModel.Annotations.
Install
Run the following command in Package Manager Console or Command Prompt to install Maris.ComponentModel.Annotations.
- Package Manager Console
Install-Package Maris.ComponentModel.Annotations
- Command Prompt
dotnet add package Maris.ComponentModel.Annotations
Usage
Retrieve display name of enumeration
You can retrieve the display name configured for each item of an enumeration. Display names for each enumeration value are set using DisplayAttribute. It is also possible to define display names in resource files.
using Maris.ComponentModel;
public enum Status
{
[Display(Name = "Preparation is ready.")]
Ready = 1,
[Display(
ResourceType = typeof(EnumExtensionsTestResources),
Name = nameof(EnumExtensionsTestResources.InProgress))]
InProgress = 2,
Done = 3,
}
Console.WriteLine(Status.Ready.GetDisplayName()); // Output: Preparation is ready.
Console.WriteLine(Status.InProgress.GetDisplayName()); // Output: Work is in progress.
Console.WriteLine(Status.Done.GetDisplayName()); // Output: Done
Display names are retrieved using the GetDisplayName() extension method.
By referencing the Maris.ComponentModel namespace, the GetDisplayName() method becomes available.
Dependencies
System.ComponentModel.Annotations
System.ComponentModel.Annotationsthat provides attributes for defining object metadata.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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 is compatible. 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 Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- System.ComponentModel.Annotations (>= 5.0.0)
-
net10.0
- System.ComponentModel.Annotations (>= 5.0.0)
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 521 | 12/22/2025 |
| 2.1.0-Beta3 | 285 | 12/19/2025 |
| 2.1.0-Beta2 | 312 | 12/16/2025 |