6 packages tagged with “nullcheck”
Fluent Null check - With - Return - If - Unless - Do - As<> - AsNullable<> - Cast<> - SilentCast<> - TryWith - TryReturn - TryDo -Throw Check argument and throw exception - ShouldnotBeNull - ShouldHaveValue (for T?) - ShouldBeInRange - ShouldnotBeInRange - ShouldBeAtLeast - ShouldBeAtMost - ShouldSatisfyCondition Enumerable extensions - ForEach - In - Iterate String extensions - IsNullOrEmpty - IsNullOrWhitespace - FillFormat - JoinToString - JoinNotEmptyToString - JoinNotBlankToString - ConcatToString - Parse<T> Enum extensions - GetAttribute<T> - GetAttributes<T> - GetDescription - GetDescriptionOrValue Reflection extensions - GetUnderlyingType - GetMemberValueExpression Expression visitors: - GetMembersExpressionVisitor - GetParametersExpressionVisitor - UpdateMembersExpressionVisitor - UpdateParametersExpressionVisitor Expression extensions: - AndAlso - OrElse - GetParameters - UpdateParameter - GetMembers - GetMemberExpressions - GetLeafMembers - GetLeafMemberExpressions - UpdateMembers Multithreading - ReadLock - WriteLock - UpgradeableLock - ReaderWriterLockAsync ReaderWriterLockSlim extensions - UseReadLock - UseWriteLock - UseUpgradeableLock
Helper functions to aid in argument validation for C# functions. Example Usage: Throw.IfNull(argument, nameof(argument)); Throw.IfNullOrEmpty(argument, nameof(argument));
Represents a validator that simplifies checking method and constructor arguments and throws the appropriate exceptions.
Contains an extension method for a System.Object that checks whether it is null and in case it is, throws an ArgumentNullException, otherwise returns the same instance.
Contains an extension method for System.String that checks whether it is null or empty and in case it is, throws an ArgumentNullException, otherwise returns the same instance.
Contains an extension method for System.String that checks whether it is null, empty or white-space and in case it is, throws an ArgumentNullException, otherwise returns the same instance.