Visual Basic (Declaration) | |
---|---|
<ExtensionAttribute()> Public Overloads Shared Function OnComplete(Of T)( _ ByVal source As IdeaBlade.EntityModel.EntityQueryOperation(Of T), _ ByVal onSuccess As Action(Of IEnumerable(Of T)), _ ByVal onFail As Action(Of Exception) _ ) As IdeaBlade.EntityModel.EntityQueryOperation(Of T) |
Visual Basic (Usage) | ![]() |
---|---|
Dim source As IdeaBlade.EntityModel.EntityQueryOperation(Of T) Dim onSuccess As Action(Of IEnumerable(Of T)) Dim onFail As Action(Of Exception) Dim value As IdeaBlade.EntityModel.EntityQueryOperation(Of T) value = OperationFns.OnComplete(Of T)(source, onSuccess, onFail) |
C# | |
---|---|
[ExtensionAttribute()] public static IdeaBlade.EntityModel.EntityQueryOperation<T> OnComplete<T>( IdeaBlade.EntityModel.EntityQueryOperation<T> source, Action<IEnumerable<T>> onSuccess, Action<Exception> onFail ) |
C++/CLI | |
---|---|
[ExtensionAttribute()] public: static IdeaBlade.EntityModel.EntityQueryOperation<T^>^ OnCompletegeneric<typename T> ( IdeaBlade.EntityModel.EntityQueryOperation<T^>^ source, Action<IEnumerable<T^>^>^ onSuccess, Action<Exception^>^ onFail ) |
Parameters
- source
- The EntityQueryOperation returned from an asynchronous query.
- onSuccess
- A callback to be called if the asynchronous query was successful.
- onFail
- A callback to be called if the asynchronous query failed.
Type Parameters
- T
- The type of entity queried.
Return Value
Returns the EntityQueryOperation passed to the method's source parameter.C# | ![]() |
---|---|
public OperationResult GetCustomers(Action<IEnumerable<Customer>> onSuccess = null, Action<Exception> onFail = null) { var op = Manager.Customers.ExecuteAsync(); return op.OnComplete(onSuccess, onFail).AsOperationResult(); } |
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