Note This repository is developed from the beginning using .netstandard1.0.
| Name | Details |
|---|---|
| TryToExecute |
The repository represents an implementation of the try/catch/finally block. It can execute code without worrying about exceptions; it only specifies what to do in this case and delegate it in sync or async flow.
In the following flow on trying to implement try execution (TryToExecute, TryToExecuteAsync), you delegate:
- the base execution code
try { }; - code for the catch block
catch { }; - code for finally block
finally { }.
Or can be used TryBuilder for fluent invoke.
TryBuilder.Do(async () => await FooAsync())
.Catch<IOException>(ex => ...)
.Finally(() => ...)
.ExecuteAsync();To understand more efficiently how you can use available functionalities please consult the using documentation/file.
In case you wish to use it in your project, u can install the package from nuget.org or specify what version you want:
Install-Package TryToExecute -Version x.x.x.x