Just like in C# this 'using' function will ensure the passed disposable is disposed when the closure has finished.
Usage:
using(new DisposableObject(),(myObj)=>{ // do work with myObj }); // myObj automatically has it's dispose method called.
Object to be disposed.
Function call to execute.
Returns whatever the closure's return value is.
Generated using TypeDoc
Just like in C# this 'using' function will ensure the passed disposable is disposed when the closure has finished.
Usage:
using(new DisposableObject(),(myObj)=>{ // do work with myObj }); // myObj automatically has it's dispose method called.