FaustVX.PrimaryParameter.SG 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FaustVX.PrimaryParameter.SG --version 0.2.0                
NuGet\Install-Package FaustVX.PrimaryParameter.SG -Version 0.2.0                
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="FaustVX.PrimaryParameter.SG" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FaustVX.PrimaryParameter.SG --version 0.2.0                
#r "nuget: FaustVX.PrimaryParameter.SG, 0.2.0"                
#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.
// Install FaustVX.PrimaryParameter.SG as a Cake Addin
#addin nuget:?package=FaustVX.PrimaryParameter.SG&version=0.2.0

// Install FaustVX.PrimaryParameter.SG as a Cake Tool
#tool nuget:?package=FaustVX.PrimaryParameter.SG&version=0.2.0                

Primary Parameter

NuGet version (FaustVX.PrimaryParameter.SG) Update NuGet

Using a Field attributes on parameters Automaticaly generate private readonly fields Forbid the use of primary constructor's parameters

Usage

partial class C([Field(Name = "_a"), Field]int i) // type must be partial, but can be class / struct / record
{
    public void M0()
    {
        i++;                    // error on usage of i
        Console.WriteLine(i);   // error on usage of i
    }
    public void M1()
    {
        var i = 0;
        i++;                    // don't error on usage of locals
        Console.WriteLine(_i);  // automaticaly created readonly field
        Console.WriteLine(_a);	// automaticaly created readonly field based on Name property
    }
}

Versions

Version Date Comments
v0.2.0 20/04/2023 Support for Name fields and multiple Field
v0.1.0 19/04/2023 Initial release
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.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
1.7.0 297 6/22/2024
1.6.0 97 6/22/2024
1.5.1 204 5/18/2024
1.5.0 96 5/18/2024
1.4.0 101 5/18/2024
1.3.4 95 5/18/2024
1.3.3 407 12/1/2023
1.3.2 198 11/19/2023
1.3.1 140 11/19/2023
1.3.0 125 11/19/2023
1.2.0 262 8/24/2023
1.1.0 251 8/15/2023
1.0.0 147 7/31/2023
0.4.7 155 7/16/2023
0.4.6.1 157 7/16/2023
0.4.6 155 7/16/2023
0.4.5 140 5/17/2023
0.4.4 178 4/27/2023
0.4.3 173 4/27/2023
0.4.2 172 4/26/2023
0.4.1 178 4/25/2023
0.4.0 189 4/22/2023
0.3.1 177 4/20/2023
0.3.0 181 4/20/2023
0.2.0 174 4/20/2023
0.1.0 186 4/19/2023