A library designed to apply type-safe and expand type management in c#.
$ dotnet add package JAAvila.SafeTypesSafeTypes Utilities is a collection of tools and utilities designed to enhance type safety in your projects. With this library, you can reduce runtime errors by leveraging compile-time type checks and ensuring stricter contracts within your codebase.
Start by installing the package via NuGet:
dotnet add package JAAvila.SafeTypes
Integrate the library into your project to start leveraging its type-safe utilities.
Note: The library takes full advantage of modern C# features, so make sure your project matches the minimum requirements mentioned above.
Add the package to your project using the command:
dotnet add package JAAvila.SafeTypes
Import the library into your code:
using JAAvila.SafeTypes;
Start coding with added type-safe reliability!
Here’s a basic example to illustrate how you can use this utility:
using SafeTypes.SafeTypes.Extension;
IEnumerable<int>? source = null;
var result = source.SafeNull().ToList();
// Use the type-safe instance as needed
More detailed examples can be found in the documentation (soon).
Contributions are welcome! If you’d like to contribute, please fork this repository, create a new branch, and submit a pull request with your changes.
Before contributing, make sure to review the code of conduct and guidelines for contributions.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.