Margarida.Core.Attributes 1.0.2

dotnet add package Margarida.Core.Attributes --version 1.0.2
                    
NuGet\Install-Package Margarida.Core.Attributes -Version 1.0.2
                    
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="Margarida.Core.Attributes" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Margarida.Core.Attributes" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Margarida.Core.Attributes" />
                    
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 Margarida.Core.Attributes --version 1.0.2
                    
#r "nuget: Margarida.Core.Attributes, 1.0.2"
                    
#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=Margarida.Core.Attributes&version=1.0.2
                    
Install Margarida.Core.Attributes as a Cake Addin
#tool nuget:?package=Margarida.Core.Attributes&version=1.0.2
                    
Install Margarida.Core.Attributes as a Cake Tool

Latest version License LGPLv3

Margarida Core Attributes

Overview

A collection of shared attributes for .NET Core applications

Installation

Margarida Core Attributes is available as a NuGet package. You can install it using the NuGet Package Console window:

PM> Install-Package Margarida.Core.Attributes

List of attributes

DescriptionAttribute

A quick way to add description to enums inside .NET Core applications.

Usage
enum Colors
{
    [Description("Black")]
    Black = 0,

    [Description("White")]
    White = 1
}

string black = Colors.Black.GetDescription(); //<---- "Black"
string white = Colors.White.GetDescription(); //<---- "White"

Singleton Transient Scoped Attributes

Points to AddMarkedByAttributes extension, Add a scoped, transient or singleton services of the types that marked these attributes.

Usage
[Scoped]
public class ScopeClass 
{
}

[Transient]
public class TransientClass 
{
}

[Singleton]
public class SingletonClass 
{
}

public class Startup
{
    public void ConfigureServices()
    {
        services.AddMarkedByAttributes(x => x.RegisterFromAssembly(GetType().Assembly));
    }
}
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 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 netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.2 443 9/8/2022
1.0.1 420 9/8/2022
1.0.0 418 9/8/2022