Catel.MVVM.Providers.LogicBase.CompleteViewModelClosingAsync C# (CSharp) Method

CompleteViewModelClosingAsync() protected method

Awaits until the closing of the view model is completed.
protected CompleteViewModelClosingAsync ( ) : Task
return Task
        protected async Task CompleteViewModelClosingAsync()
        {
            while (true)
            {
                lock (_lockObject)
                {
                    if (!IsClosingViewModel)
                    {
                        return;
                    }
                }

                Log.Debug($"View '{TargetViewType}' is still closing the view model, awaiting completion");

                await TaskShim.Delay(5);
            }
        }