private void AsyncCallServer(ServerDelegate caller, string server_id, string URL, int min_delay, int max_delay, IEnumerable <string> serverUrls) { caller.BeginInvoke(server_id, URL, min_delay, max_delay, serverUrls, asyncResult => { AsyncResult ar = (AsyncResult)asyncResult; ServerDelegate remoteDel = (ServerDelegate)ar.AsyncDelegate; remoteDel.EndInvoke(asyncResult); }, null); }
public IAsyncResult Server(string fields, string serverId, string url, int maxFaults) { _nodesCreated++; MaxFaults = maxFaults; return(_serverDelegate.BeginInvoke(fields, serverId, url, null, null)); }