throw icon indicating copy to clipboard operation
throw copied to clipboard

A simple, fluent, extensible, and fully customizable library for throwing exceptions for projects using .NET 6+

Results 20 throw issues
Sort by recently updated
recently updated
newest added

Hey, I'm really impressed with the design this library, it's very well thought out. Have you considered if some of this could be repurposed or made available in a way...

Add the following extensions methods for dictionaries: ```csharp var dictionary = new Dictionary { ["key1"] = "value1", ["key2"] = "value2", }; dictionary.Throw().IfContainsKey("key1"); dictionary.Throw().IfNotContainsKey("key3"); ``` And the corresponding dictionary properties extension...

enhancement
good first issue

Currently, when an exception type is specified, the exception will be created using the parameterless constructor. It would be nice if the exception message could be set using the `(string...

**`In(params T[])`** This type of validator would accept a sequence of values (the sequence). The implementation would scan the sequence and throw an exception if **any** element in the sequence...

Cleaned Unused using statements and utilised global using file to improve the code readability

Add the following collection validations: ```csharp var collection = new[] { 1, 2, 3, 3 }; collection.Throw().IfAny(item => item == 3); collection.Throw().IfSingle(item => item == 2); collection.Throw().IfNotSingle(item => item ==...

enhancement