Extension method to process the result of a Coroutine operation with result value.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim source As IdeaBlade.EntityModel.CoroutineOperation
Dim onSuccess As Action(Of T)
Dim onFail As Action(Of Exception)
Dim value As IdeaBlade.EntityModel.CoroutineOperation
value = OperationFns.OnComplete(Of T)(source, onSuccess, onFail) |
Parameters
- source
- The CoroutineOperation returned from Coroutine.Start()
- onSuccess
- A callback to be called if the Coroutine was successful. The result object is first cast to the expected type.
- onFail
- A callback to be called if the Coroutine failed.
Type Parameters
- T
Return Value
Returns the CoroutineOperation passed to the method's source parameter.
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