Пример #1
0
        //----- property -----

        //----- method -----


        /// <summary>
        /// 遷移中に外部処理の待機開始.
        /// </summary>
        public WaitEntity BeginWait()
        {
            var entity = new WaitEntity();

            entity.OnDisposeAsObservable()
            .Subscribe(_ => FinishWait(entity))
            .AddTo(Disposable);

            waitEntityIds.Add(entity.Identifier);

            return(entity);
        }
Пример #2
0
        /// <summary>
        /// <see cref="BeginWait"/>から取得された<see cref="WaitEntity"/>で待ち状態を解除.
        /// </summary>
        public void FinishWait(WaitEntity entity)
        {
            if (entity == null)
            {
                return;
            }

            if (!waitEntityIds.Contains(entity.Identifier))
            {
                return;
            }

            waitEntityIds.Remove(entity.Identifier);
        }