public static ILoadingDecoratorProperties Suppress()
        {
            var context = LoadingDecoratorContext.GetEmpty();

            lock (Locker)
            {
                ContextList.Add(context);
            }

            CurrentContextChanged?.Invoke();

            return(context);
        }
        public static void Release(ILoadingDecoratorProperties properties)
        {
            lock (Locker)
            {
                LoadingDecoratorContext context = ContextList.FirstOrDefault(i => i.Id == properties.Id);
                if (context == null)
                {
                    return;
                }

                ContextList.Remove(context);
            }

            CurrentContextChanged?.Invoke();
        }
        public static ILoadingDecoratorProperties Show(string loadingText = null, bool showProgress = false)
        {
            var context = new LoadingDecoratorContext
            {
                Visible        = true,
                ShowPercentage = showProgress
            };

            if (loadingText != null)
            {
                context.Text = loadingText;
            }

            lock (Locker)
            {
                ContextList.Add(context);
            }

            CurrentContextChanged?.Invoke();

            return(context);
        }
 static LoadingDecoratorCommand()
 {
     ContextList.Add(LoadingDecoratorContext.GetEmpty());
 }