| UnityContainerAsyncExtensionsResolveAsyncT Method (IUnityContainer, String, CancellationToken, ResolverOverride) |
Resolves and asynchronously initializes an instance.
Namespace:
Ditto.AsyncInit.Unity
Assembly:
Ditto.AsyncInit.Unity (in Ditto.AsyncInit.Unity.dll) Version: 1.6.0.2641
Syntax public static Task<T> ResolveAsync<T>(
this IUnityContainer container,
string name,
CancellationToken cancellationToken,
params ResolverOverride[] overrides
)
<ExtensionAttribute>
Public Shared Function ResolveAsync(Of T) (
container As IUnityContainer,
name As String,
cancellationToken As CancellationToken,
ParamArray overrides As ResolverOverride()
) As Task(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static Task<T>^ ResolveAsync(
IUnityContainer^ container,
String^ name,
CancellationToken cancellationToken,
... array<ResolverOverride^>^ overrides
)
[<ExtensionAttribute>]
static member ResolveAsync :
container : IUnityContainer *
name : string *
cancellationToken : CancellationToken *
overrides : ResolverOverride[] -> Task<'T>
Parameters
- container
- Type: IUnityContainer
The container. - name
- Type: SystemString
The name used for registration. - cancellationToken
- Type: System.ThreadingCancellationToken
Cancellation token. - overrides
- Type: ResolverOverride
Resolver overrides.
Type Parameters
- T
- The type of object to resolve.
Return Value
Type:
TaskTTask capturing the initialization.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IUnityContainer. 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).
See Also