AccidentalFish.UIKit.FluentAnimate.CreateChainedAnimationAction C# (CSharp) Метод

CreateChainedAnimationAction() приватный Метод

private CreateChainedAnimationAction ( Animation animation, UIViewAnimationOptions options, System.Action nextAction ) : System.Action
animation Animation
options UIViewAnimationOptions
nextAction System.Action
Результат System.Action
        private Action CreateChainedAnimationAction(Animation animation, UIViewAnimationOptions options, Action nextAction)
        {
            if (animation.IsActionOnly)
            {
                return () =>
                {
                    animation.Action();
                    if (nextAction != null) nextAction();
                    else
                    {
                        if (_whenCompleteAction != null) _whenCompleteAction();
                        if (_repeaterAction != null) _repeaterAction();
                    }
                };
            }
            return () =>
                    UIView.Animate(animation.Duration, animation.Delay, options,
                                   () => animation.Action(),
                                   () =>
                                   {
                                       if (nextAction != null) nextAction();
                                       else
                                       {
                                           if (_whenCompleteAction != null) _whenCompleteAction();
                                           if (_repeaterAction != null) _repeaterAction();
                                       }
                                   });
        }