public LongRunningAction Reboot(string toLevel) { Reboot reboot = new Reboot(this.Game, toLevel); ServiceHelper.AddComponent((IGameComponent)reboot); bool disposed = false; reboot.Disposed += (EventHandler <EventArgs>)((_, __) => disposed = true); return(new LongRunningAction((Func <float, float, bool>)((_, __) => disposed))); }
public LongRunningAction Reboot(string toLevel) { Reboot reboot = new Reboot(this.Game, toLevel); ServiceHelper.AddComponent((IGameComponent) reboot); bool disposed = false; reboot.Disposed += (EventHandler<EventArgs>) ((_, __) => disposed = true); return new LongRunningAction((Func<float, float, bool>) ((_, __) => disposed)); }