Namespace: Bsw.Isonas.Dotnet.Client.UtilityAssembly: Bsw.Isonas.Dotnet.Client (in Bsw.Isonas.Dotnet.Client.dll) Version: 1.2.1.0 (1.2.1)
public static Task<TReturn> UsingAsync<T, TReturn>(
this T obj,
Func<T, Task<TReturn>> code
)
where T : IAsyncDisposable
public static Task<TReturn> UsingAsync<T, TReturn>(
this T obj,
Func<T, Task<TReturn>> code
)
where T : IAsyncDisposable
<ExtensionAttribute>
Public Shared Function UsingAsync(Of T As IAsyncDisposable, TReturn) (
obj As T,
code As Func(Of T, Task(Of TReturn))
) As Task(Of TReturn)
<ExtensionAttribute>
Public Shared Function UsingAsync(Of T As IAsyncDisposable, TReturn) (
obj As T,
code As Func(Of T, Task(Of TReturn))
) As Task(Of TReturn)
public:
[ExtensionAttribute]
generic<typename T, typename TReturn>
where T : IAsyncDisposable
static Task<TReturn>^ UsingAsync(
T obj,
Func<T, Task<TReturn>^>^ code
)
public:
[ExtensionAttribute]
generic<typename T, typename TReturn>
where T : IAsyncDisposable
static Task<TReturn>^ UsingAsync(
T obj,
Func<T, Task<TReturn>^>^ code
)
- T
- TReturn
Return Value
Type:
Task 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
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).