Example #1
0
        public async Task <bool> WarnAboutDotnetDeprecationAsync(IEnumerable <IProjectContextInfo> projects, CancellationToken cancellationToken)
        {
            var result = false;

            DeprecatedFrameworkModel dataContext = await DotnetDeprecatedPrompt.GetDeprecatedFrameworkModelAsync(projects, cancellationToken);

            InvokeOnUIThread(() => { result = WarnAboutDotnetDeprecationImpl(dataContext); });

            return(result);
        }
        private bool WarnAboutDotnetDeprecationImpl(DeprecatedFrameworkModel dataContext)
        {
            var window = new DeprecatedFrameworkWindow(UIContext)
            {
                DataContext = dataContext
            };

            var dialogResult = window.ShowModal();

            return(dialogResult ?? false);
        }