Skip to content

alvesdm/PromiseSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Build status

PromiseSharp

A C# Promise package for .net core.

How to use it?

await new Promise((promise) =>
{
    if (something)
        promise.Resolve();
    else
        promise.Reject(new Exception("Bangg!!!"));
})
.Then(() => { Console.WriteLine("Nice we..."); }) // HIT
.Then(() => { Console.WriteLine("... did it!!!"); }) // HIT
.Fail((e) => { Console.WriteLine($"Well.. nice we did it, otherwhise we'd get this error:{e.Message}"); })
.Always(() => { Console.WriteLine("I don't care whether we did it or not...Move on!"); }) // HIT
.Fire();

License

Code released under the MIT license.

About

A C# Promise package for .net core.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages