Skip to content
Zeid Youssefzadeh edited this page Feb 18, 2025 · 8 revisions

What is ZeidLab.ToolBox library?

ZeidLab.ToolBox is a versatile and robust utility library designed to simplify common programming tasks, enhance error handling, and promote functional programming paradigms in C#. It provides a collection of tools and extensions that streamline operations such as null checks, error handling, task management, and railway-oriented programming (ROP) sometimes known as "Result Pattern".

Features

  • Unit Type: A type representing the absence of a meaningful value, useful in functional programming.
  • Maybe Type: A monadic type for handling optional values, similar to Option in functional languages.
  • Result Type: A robust error-handling type for railway-oriented programming, allowing chaining of operations with explicit success and failure states.
  • Error Handling: Structured error handling with ResultError,supporting error codes, messages, and exceptions.
  • Asynchronous Support: Comprehensive support for asynchronous operations with Result types.

^ Back To Top

What is in ZeidLab.ToolBox library?

You can find helpful examples in this wiki, list of pages are shown on the side of this page. But for ease of access and clarity I am going to list some of the main pages in this wiki with a short description.

click on the type name to navigate to the page:

Types and PageLink Short Description
Maybe<TIn> A monadic type for handling optional values, similar to Option in functional languages.
Result<TIn> A robust error-handling type for railway-oriented programming, allowing chaining of operations with explicit success and failure states.
Unit A type representing the absence of a meaningful value, useful in functional programming.
ResultError Structured error handling with supporting error codes, messages, and exceptions.
Try<TIn> A delegate to handel the unhandled exceptions in an efficient and expressive way in a synchronous flow of functions.
TryAsync<TIn> A delegate to handel the unhandled exceptions in an efficient and expressive way in a synchronous flow of functions.

^ Back To Top