Beispiel #1
0
        public TransitionItemBuilder With(ITransitionItem item)
        {
            WithName(item.Name)
            .WithKey(item.Key)
            .WithIn(item.In)
            .WithAppear(item.Appear)
            .WithEnter(item.Enter)
            .WithExit(item.Exit)
            .WithOnExited(item.OnExited)
            .WithTemplate(item.Template);

            return(this);
        }
        private Func <IReference, Task> HandleExited(ITransitionItem item)
        {
            return(async(IReference _ref) =>
            {
                if (Children.Any(child => child.Name == item.Name))
                {
                    return;
                }

                if (item.OnExited != null)
                {
                    await item.OnExited.Invoke(_ref);
                }

                if (Mounted)
                {
                    Items = Items.Where(it => it.Item1.Name != item.Name).ToList();

                    PreviousItems = PreviousItems.Where(it => it.Item1.Name != item.Name).ToList();

                    await InvokeAsync(StateHasChanged);
                }
            });
        }
Beispiel #3
0
 public void Add(ITransitionItem <TState, TOption> item)
 {
     _list.Add(item);
 }