/// <summary> /// Play the color flow after the specified delay /// </summary> /// <param name="millisecondsDelay"></param> /// <param name="endAction"></param> /// <param name="repetition"></param> /// <returns></returns> public async Task <FluentFlow> PlayAfter(int millisecondsDelay, ColorFlowEndAction endAction, int repetition = 0) { CheckExpressions(); await Task.Delay(millisecondsDelay); return(await Play(endAction, repetition)); }
/// <summary> /// Play the color flow /// </summary> /// <param name="endAction"></param> /// <param name="repetition"></param> /// <returns></returns> public async Task <FluentFlow> Play(ColorFlowEndAction endAction = ColorFlowEndAction.Restore, int repetition = 0) { CheckExpressions(); ColorFlow.ColorFlow flow = new ColorFlow.ColorFlow(repetition, endAction, _expressions); await _startColorFlowMethod(flow); return(this); }
/// <summary> /// Constructor /// </summary> /// <param name="repetitionCount"></param> /// <param name="endAction"></param> /// <param name="expressions"></param> public ColorFlow(int repetitionCount, ColorFlowEndAction endAction, IEnumerable <ColorFlowExpression> expressions) { RepetitionCount = repetitionCount; EndAction = endAction; AddRange(expressions); }
/// <summary> /// Constructor /// </summary> /// <param name="repetitionCount"></param> /// <param name="endAction"></param> /// <param name="expressions"></param> public ColorFlow(int repetitionCount, ColorFlowEndAction endAction, params ColorFlowExpression[] expressions) : this(repetitionCount, endAction, expressions?.ToList()) { }