Dsr.Architecture.TryCatch 1.0.0

dotnet add package Dsr.Architecture.TryCatch --version 1.0.0
                    
NuGet\Install-Package Dsr.Architecture.TryCatch -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dsr.Architecture.TryCatch" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dsr.Architecture.TryCatch" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Dsr.Architecture.TryCatch" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Dsr.Architecture.TryCatch --version 1.0.0
                    
#r "nuget: Dsr.Architecture.TryCatch, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Dsr.Architecture.TryCatch@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Dsr.Architecture.TryCatch&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Dsr.Architecture.TryCatch&version=1.0.0
                    
Install as a Cake Tool

DSR.Architecture.TryCatch

This project provides a fluent and expressive way to handle exceptions in C#. It offers a TryCatch utility that allows for chaining Try, Catch, and Finally blocks in a declarative style, improving code readability and maintainability.

Features

  • Fluent API: A simple and intuitive API for handling exceptions.
  • Asynchronous Support: Works seamlessly with asynchronous operations.
  • Generic and Non-Generic Versions: Supports methods with and without return values.

Usage

Use this project to simplify exception handling and make your code more robust and readable.

Installation

Once published, install via NuGet:

dotnet add package DSR.Architecture.TryCatch

Contributing

Contributions are welcome! Please submit issues or pull requests via GitHub.

License

This project is licensed under the MIT License. See the LICENSE for details.

Authors

  • Jonathan Jimenez

Tags

utility, exception-handling, try-catch, fluent-api, architecture, modular, enterprise, dsr-architecture

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dsr.Architecture.TryCatch:

Package Downloads
Dsr.Architecture.Infrastructure.Persistence.EntityFramework

EFCore persistence library for DSR.Architecture. Provides repository implementations and data access patterns for EFCore, enabling scalable, modular, and testable enterprise solutions as part of the DSR.Architecture ecosystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 117 7/17/2025