public XPloitSocketClient[] SearchClients(delIsClient comparer, params object[] tag) { List <XPloitSocketClient> lx = new List <XPloitSocketClient>(); lock (_Clients) { foreach (XPloitSocketClient cl1 in _Clients) { if (comparer == null || comparer(cl1, tag)) { lx.Add(cl1); } } } return(lx.ToArray()); }
public int RaiseActionForClient(delIsClient comparer, delIsClient action, params object[] tag) { if (action == null) { return(0); } int dv = 0; lock (_Clients) { foreach (XPloitSocketClient client in _Clients) { if (comparer == null || comparer(client, tag)) { if (action(client, tag)) { dv++; } } } } return(dv); }
public XPloitSocketClient[] SearchClients(delIsClient comparer, params object[] tag) { List<XPloitSocketClient> lx = new List<XPloitSocketClient>(); lock (_Clients) { foreach (XPloitSocketClient cl1 in _Clients) if (comparer == null || comparer(cl1, tag)) lx.Add(cl1); } return lx.ToArray(); }
public int RaiseActionForClient(delIsClient comparer, delIsClient action, params object[] tag) { if (action == null) return 0; int dv = 0; lock (_Clients) { foreach (XPloitSocketClient client in _Clients) if (comparer == null || comparer(client, tag)) { if (action(client, tag)) dv++; } } return dv; }