private static void ActiveSongChanged(TsDelegate del) { EventHandler <EventArgs> handler = (s, e) => del.Invoke(); MediaPlayer.ActiveSongChanged += handler; _cache.Cache(MediaEventType.ActiveSongChanged, del, handler); }
public static TsObject input_controller_connected_add(TsObject[] args) { var del = (TsDelegate)args[0]; EventHandler <IController> handler = (s, e) => del.Invoke(new TsInstanceWrapper(e)); ControllerConnected += handler; _controllerEvents.Cache(true, del, handler); return(TsObject.Empty); }