using System; namespace LitMotion.Extensions { /// /// Provides binding extension methods for Progress. /// public static class LitMotionProgressExtensions { /// /// Create a motion data and bind it to IProgress /// /// The type of value to animate /// The type of special parameters given to the motion data /// The type of adapter that support value animation /// This builder /// Target object that implements IProgress /// Handle of the created motion data. public static MotionHandle BindToProgress(this MotionBuilder builder, IProgress progress) where TValue : unmanaged where TOptions : unmanaged, IMotionOptions where TAdapter : unmanaged, IMotionAdapter { Error.IsNull(progress); return builder.Bind(progress, static (x, progress) => progress.Report(x)); } } }