What can I do with Existential.Net?
Work more safely with nulls
Existential.Net provides a couple of ways of dealing with the absence of data.
The static Validate class provides methods that'll throw an exception if data doesn't meet their requirements - most commonly if a null is provided. They're very simple; but fail fast in a controlled manner, and reduce the amount of boiler-plate code required to do so.
Exception filter logging
Methods are provided to support logging exceptions from within exception filters.
Resolve Code Analysis issues
Existential.Net provides functionality that helps to resolve a couple of common Code Analysis issues.
- Resolving CA1062: Validate arguments of public methods
- Resolving CA2000: Dispose objects before losing scope
Convert to IEnumerable<T>
Occasionally it's useful to be able to treat a single value as an IEnumerable<T>, or it would have been useful to have an IEnumerable actually be an IEnumerable<T>. Existential.Net provides conversions to enable that.
- GetGenericEnumerable<T>: API Documentation
- GetGenericEnumerable: API Documentation
Work with types
Existential provides a number of other small utility classes; to safely return an instance of IDisposable from a method, to calculate hash codes, to provide the name of the current method (without the need for reflection), and (using reflection) to report the name of a generic type in the form it's usually written.
- Disposable: How To, API Documentation
- HashCodeHelper: API Documentation
- ThisMethod: API Documentation
- Type Extension Methods: API Documentation