20 packages tagged with “NotNull”
JetBrains.Annotations help reduce false positive warnings, explicitly declare purity and nullability in your code, deal with implicit usages of members, support special semantics of APIs in ASP.NET and XAML frameworks and otherwise increase accuracy of JetBrains Rider and ReSharper code inspections.
A source code only package which allows you to use .NET's new nullable attributes in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework. This package does not contain any compiled binaries, but instead adds the attribute classes as C# source code to your project. Because this code is compiled together with the rest of your code, the built binaries will not have a dependency on this package, meaning that you can perfectly use it for both libraries and applications. The C# code is only included if you are targeting a framework version which does not support the new nullable attributes. For example, if you create a library which multi-targets .NET Standard 2.0 and 2.1, the majority of the attributes are not included in the .NET Standard 2.1 version, because it already provides these by default. Please see https://github.com/manuelroemer/Nullable for additional information on how to use this package.
ReSharper Annotations help reduce false positive warnings, explicitly declare purity and nullability in your code, deal with implicit usages of members, support special semantics of APIs in ASP.NET and XAML frameworks and otherwise increase accuracy of ReSharper code inspections. This package is a clone of the JetBrains.Annotations project by JetBrains, but not resulting in a public .dll that could prove to collide with other implementations, but resulting in an internal code contribution that will not collide externally. For some reason the Nuget team decided that the content files feature is not (yet) available for .net Core projects. In this situation you might want to consider downloading the actual code file. See https://github.com/bepost/jetbrains-annotations-internal for more information. All credits for the actual functionality go to the JetBrains team.
Reports diagnostics, helping you to annotate your source tree with (Item)NotNull / (Item)CanBeNull attributes. See also: https://www.jetbrains.com/resharper/help/Code_Analysis__Code_Annotations.html You need Visual Studio 2015/2017/2019 and Resharper v9 or higher to use this analyzer. See package "ResharperCodeContractNullabilityFxCop" if you use Visual Studio 2013 or lower.
Simple helper methods for verifying argument values.
This package is for projects on Microsoft Visual Studio 2015 to have design-time and compile-time warnings. It checks, that all reference parameters in methods and constructors have NotNull/CanBeNull attributes. You have to use Jetbrains.
MicroElements source only package: Collection extensions: NotNull, Iterate, Execute, WhereNotNull, Materialize, IncludeByWildcardPatterns, ExcludeByWildcardPatterns. Special collections: Cache, TwoLayerCache, PollingCache.
Contains Verify - fast and extensible class for simple method arguments asserts. Example: Verify.Args(new { param1, param2 }).NotNull()
Reports diagnostics, helping you to annotate your source tree with (Item)NotNull / (Item)CanBeNull attributes. See also: https://www.jetbrains.com/resharper/help/Code_Analysis__Code_Annotations.html You need Visual Studio 2013/2012/2010 and Resharper v8 or higher to use this analyzer. See package "ResharperCodeContractNullability" if you use Visual Studio 2015.
MicroElements source only package: Collection extensions. Main methods: NotNull.
NotNull is a small library to make working with null values easier.
ReSharper Annotations help reduce false positive warnings, explicitly declare purity and nullability in your code, deal with implicit usages of members, support special semantics of APIs in ASP.NET and XAML frameworks and otherwise increase accuracy of ReSharper code inspections. All usages of ReSharper Annotations attributes are erased from metadata by default, which means no actual binary reference to 'JetBrains.Annotations.dll' assembly is produced. If you need to preserve these attributes in metadata, just define 'JETBRAINS_ANNOTATIONS' conditional compilation symbol in your projects.
This package contains two IEnumerable extension methods named WhereNotNull(). It skips all null elements from a sequence. This is useful for projects that have nullable reference types enabled because it converts IEnumerable<T?> into IEnumerable<T>
System.Text.Json-compatible Optionals.
Defines the nullable reference type attributes of namespace System.Diagnostics.CodeAnalysis for frameworks that do not include them, namely .NET Framework 2.0 to 4.8, .NET Core 1.0 to 2.2 and .NET Standard 1.0 to 2.2. Usage: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp3.0;netcoreapp2.2;netcoreapp2.1;netcoreapp2.0;netcoreapp1.1;netcoreapp1.0;netstandard2.1;netstandard2.0;netstandard1.6;netstandard1.5;netstandard1.4;netstandard1.3;netstandard1.2;netstandard1.1;netstandard1.0;net48;net472;net471;net47;net462;net461;net46;net452;net451;net45;net403;net40;net35;net30;net20</TargetFrameworks> <FrameworksLackingNullableReferenceTypeAttributes>|net20|net30|net35|net40|net403|net45|net451|net452|net46|net461|net462|net47|net471|net472|net48|netcoreapp1.0|netcoreapp1.1|netcoreapp2.0|netcoreapp2.1|netcoreapp2.2|netstandard1.0|netstandard1.1|netstandard1.2|netstandard1.3|netstandard1.4|netstandard1.5|netstandard1.6|netstandard2.0|</FrameworksLackingNullableReferenceTypeAttributes> <LangVersion>latest</LangVersion> <Nullable>enable</Nullable> <NoWarn>NETSDK1138</NoWarn> </PropertyGroup> <!-- Replace '#' through '$'! --> <ItemGroup Condition="#(FrameworksLackingNullableReferenceTypeAttributes.Contains('|#(TargetFramework)|'))"> <PackageReference Include="Hafner.Compatibility.NullableReferenceTypeAttributes"> <Version>1.0.0</Version> </PackageReference> </ItemGroup> </Project> Above XML is a Visual Studio 2022 C# project file (*.csproj) that targets all the frameworks from .NET 2.0 to .NET 6.0 for the .NET flavors '.NET Framework', '.NET Core' and '.NET Standard'. Watch out: If you copy/paste above snipet you need to replace the '#' signs through '$' signs. I had to check it in like this as otherwise the condition got interpreted, sorry about that.
Defines the second generation of nullable reference type attributes of namespace "System.Diagnostics.CodeAnalysis" for frameworks that do not include them.
Defines the third generation of nullable reference type attributes of namespace "System.Diagnostics.CodeAnalysis" for frameworks that do not include them.
Defines the first generation of nullable reference type attributes of namespace "System.Diagnostics.CodeAnalysis" for frameworks that do not include them.
Meta-package that includes Hafner.Compatibility.* packages (see https://github.com/HugoRoss/Hafner.Compatibility.Packages) as required. See 'PackageReadMe.md' for an overview with the exact types that are currently supported and for which framework they are imported.