/// <summary> /// On the specified name and callback. /// </summary> /// <param name="name">Name.</param> /// <param name="callback">Callback.</param> public void On(string name, SergIOCallback callback) { if (callbacks == null) { callbacks = new Dictionary <string, SergIOCallbackData>(); } if (callbacks.ContainsKey(name)) { callbacks[name].Callback += callback; } else { SergIOCallbackData d = new SergIOCallbackData(); d.Callback += callback; callbacks.Add(name, d); } }
/// <summary> /// On the specified name and callback. /// </summary> /// <param name="name">Name.</param> /// <param name="callback">Callback.</param> public void On(string name, SergIOCallback callback) => server.On(name, callback);
/// <summary> /// On the specified name and callback. /// </summary> /// <param name="name">Name.</param> /// <param name="callback">Callback.</param> public void On(string name, SergIOCallback callback) => client.On(name, callback);