Shane32.Analyzers 1.0.1

dotnet add package Shane32.Analyzers --version 1.0.1
NuGet\Install-Package Shane32.Analyzers -Version 1.0.1
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="Shane32.Analyzers" Version="1.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shane32.Analyzers --version 1.0.1
#r "nuget: Shane32.Analyzers, 1.0.1"
#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 Shane32.Analyzers as a Cake Addin
#addin nuget:?package=Shane32.Analyzers&version=1.0.1

// Install Shane32.Analyzers as a Cake Tool
#tool nuget:?package=Shane32.Analyzers&version=1.0.1

Shane32.Analyzers

NuGet Coverage Status

Analyzers

This package contains a collection of Roslyn analyzers and code fixes that can be used to enforce coding standards and best practices in C# code.

  1. IQueryable cast analyzer

Prevents casting IQueryable<T> to IEnumerable<T>. This is a common mistake that can cause performance issues by preventing the query from being executed asynchronously.

To fix this warning, call ToListAsync() to asynchronously execute the query before casting it to IEnumerable<T>.

Explicit casts and AsEnumerable() calls will not trigger this warning.

  1. Synchronous IQueryable method call analyzer

Prevents calling Queryable methods that synchronously execute the query such as Single() or FirstOrDefault().

To fix this warning, use the asynchronous version of the method such as SingleAsync() or FirstOrDefaultAsync().

Credits

Glory to Jehovah, Lord of Lords and King of Kings, creator of Heaven and Earth, who through his Son Jesus Christ, has reedemed me to become a child of God. -Shane32

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has 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.0.1 1,014 4/11/2024
1.0.0 200 4/11/2024