public void Forget(Duration duration) { foreach (var item in items.Intersecting(duration)) { item.Value.Dispose(); } items_measure.Clear(duration); items_timesigsimple.Clear(duration); items_clefsymbols.Clear(duration); }
public static IEnumerable <IDuratedItem <T> > Intersecting_children <T>( this IDurationField <IDurationField <T> > field, Duration duration ) => field .Intersecting(duration) .SelectMany( child => child .Value .Intersecting(duration - child.Duration.Start) .Select( item => new DuratedItem <T> { Value = item.Value, Duration = item.Duration + child.Duration.Start } ) );
public static bool AnyItemIn <T>( this IDurationField <T> field, Duration duration ) => field.Intersecting(duration).Any();