T
Cocktail Help Reference
CreateAsync<T> Method
See Also  Send Feedback
Cocktail.Compat Assembly > Cocktail Namespace > Compatibility Class : CreateAsync<T> Method



source
onSuccess
onFail

Glossary Item Box

Provides compatibility for legacy code.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Shared Function CreateAsync(Of T As Class)( _
   ByVal source As IFactory(Of T), _
   ByVal onSuccess As Action(Of T), _
   ByVal onFail As Action(Of Exception) _
) As OperationResult(Of T)
Visual Basic (Usage)Copy Code
Dim source As IFactory(Of T)
Dim onSuccess As Action(Of T)
Dim onFail As Action(Of Exception)
Dim value As OperationResult(Of T)
 
value = Compatibility.CreateAsync(Of T)(source, onSuccess, onFail)
C# 
[ExtensionAttribute()]
public static OperationResult<T> CreateAsync<T>( 
   IFactory<T> source,
   Action<T> onSuccess,
   Action<Exception> onFail
)
where T: class
C++/CLI 
[ExtensionAttribute()]
public:
static OperationResult<T^>^ CreateAsyncgeneric<typename T>
( 
   IFactory<T^>^ source,
   Action<T^>^ onSuccess,
   Action<Exception^>^ onFail
) 
where T: ref class

Parameters

source
onSuccess
onFail

Type Parameters

T

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.