RandomAnalyzers.RequiredMember.Analyzer 1.0.0-rc1

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

// Install RandomAnalyzers.RequiredMember.Analyzer as a Cake Tool
#tool nuget:?package=RandomAnalyzers.RequiredMember.Analyzer&version=1.0.0-rc1&prerelease                

NuGet

Installation

RequiredMember can be installed using the NuGet command line or the NuGet Package Manager in Visual Studio.

Install using the command line:

Install-Package RandomAnalyzers.RequiredMember

Description

RequiredMember library provides you new attribute called RequiredMemberAttribute. All members of the class/struct that are marked with this attribute will require to be initialized inside object initializer. Otherwise the RequiredMember.Analyzer will sygnalize a warning that members were not initialized and you are required to do so.

Code

using RandomAnalyzers.RequiredMember;

public class Test
{
	[RequiredMember]
	public int property { get; set; }
}

// no warnings/errors

var variable = new Test() 
{
	property = 123
};

// warning
var variable = new Test();
var variable = new Test() {};

UI Example

Screenshot showing warnings for RequiredMember.Analyzer

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RandomAnalyzers.RequiredMember.Analyzer:

Package Downloads
RandomAnalyzers.RequiredMember

Provides RequiredMemberAttribute used to mark members of given classes/structs as required members. Members annotated with this attribute will be required inside object initializer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 13,740 10/30/2019
1.0.0-rc1 458 10/30/2019
0.1.0 619 10/29/2019

1.0.0:
Initial release

0.1.0:

Test upload