MvComponentExecDuplexGlobalCallbackAsync Method |
Namespace: RW.Server.Component
MvValue[] parameters = new MvValue[2]; parameters[0] = new MvValue(42); parameters[1] = new MvValue(51); var tresult = _component.ExecDuplexGlobalCallbackAsync("Multiply", parameters); Task.Run(() => { try { var result = tresult.Result; Console.WriteLine(" Duplex result = " + result.AsString()); } catch(AggregateException e) { Console.WriteLine(" Duplex result canceled."); } });
MvValue[] parameters = new MvValue[2]; parameters[0] = new MvValue(42); parameters[1] = new MvValue(51); try { MvValue result = await _component.ExecDuplexGlobalCallbackAsync("Multiply", parameters); Console.WriteLine(result.AsString()); } catch(TaskCanceledException e) { Console.WriteLine(" Duplex result canceled."); }