public void Unregister(FunctionBySingle action) { if (updates != null) { updates -= action; } }
public void Register(FunctionBySingle action) { if (updates != null) { foreach (var function in updates.GetInvocationList()) { if (function.Equals(action)) { return; } } updates += action; } else { updates = action; } }