using System; using System.Collections.Generic; public static class Extension { public static void RemoveCompletely(this System.Action action, Action removeAction) { if (null == action) { return; } Delegate[] invocations = action.GetInvocationList(); for (int i = 0; i < invocations.Length; i++) { if (invocations[i].Equals(removeAction)) { action -= removeAction; } } } public static void RemoveCompletely(this System.Action action, Action removeAction) { if (null == action) { return; } Delegate[] invocations = action.GetInvocationList(); for (int i = 0; i < invocations.Length; i++) { if (invocations[i].Equals(removeAction)) { action -= removeAction; } } } public static void RemoveCompletely(this System.Action action, Action removeAction) { if (null == action) { return; } Delegate[] invocations = action.GetInvocationList(); for (int i = 0; i < invocations.Length; i++) { if (invocations[i].Equals(removeAction)) { action -= removeAction; } } } public static void RemoveCompletely(this System.Action action, Action removeAction) { if (null == action) { return; } Delegate[] invocations = action.GetInvocationList(); for (int i = 0; i < invocations.Length; i++) { if (invocations[i].Equals(removeAction)) { action -= removeAction; } } } }