public static RoutineHandle AddTo(this RoutineHandle handler, ILifeTime lifeTime) { lifeTime.AddCleanUpAction(() => handler.Cancel()); return(handler); }
public static ILifeTime AddTo(this RoutineHandle handle, Component component) { return(component.AddTo(() => handle.Cancel())); }