Execute a function with a DisposeScope and clean up after the function scope ends.
Result of function
function to execute with resource
Execute a function with a DisposeScope and clean up after the function scope ends.
Returns
Result of function