UsingExtensionMethods UsingAsync T, TReturn  Method (T, Func T, Task TReturn  )Isonas .NET Client API Documentation

Namespace: Bsw.Isonas.Dotnet.Client.Utility
Assembly: Bsw.Isonas.Dotnet.Client (in Bsw.Isonas.Dotnet.Client.dll) Version: 1.2.1.0 (1.2.1)
Syntax

public static Task<TReturn> UsingAsync<T, TReturn>(
	this T obj,
	Func<T, Task<TReturn>> code
)
where T : IAsyncDisposable

Parameters

obj
Type: T
code
Type: OnlineSystem Func T, OnlineTask TReturn  
Type Parameters

T
TReturn

Return Value

Type: OnlineTask TReturn 

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see OnlineExtension Methods (Visual Basic) or OnlineExtension Methods (C# Programming Guide).
See Also