public CallbackRepository <T> InCallbacks() { var registeredSenderEvenArgs = RegisteredCallbacksRepository .Select(x => x.EventArgs) .ToList(); return(new CallbackRepository <T>(Control, registeredSenderEvenArgs)); }
public CallbackRepository <T> InCallbacksOf(Control sender) { var registeredSenderEvenArgs = RegisteredCallbacksRepository .Where(x => x.Sender.UniqueID == sender.UniqueID) .Select(x => x.EventArgs) .ToList(); return(new CallbackRepository <T>(sender, registeredSenderEvenArgs)); }