public UpdatePropopsalViewModel(IViewModelInteraction viewModelInteraction ,UpdateManager updateManager, IProductUpdate productUpdate)
        {
            if (productUpdate == null)
                throw new ProductUpdateFailedException(new NullReferenceException("ProductUpdate!"));

            _viewModelInteraction = viewModelInteraction;
            _productUpdate = productUpdate;
            _updateManager = updateManager;
            _userInterfaceFactory = new UpdateUserInterfaceFactory(_updateManager);


            ShowUpdateInfo();
            
        }
        public static void ApplyUpdateIfAvailable(bool showUpdateUserinterface = true, int maximumSearchTimeout = 5)
        {
            using (var updateManager = new UpdateManager(maximumSearchTimeout))

            if (showUpdateUserinterface)
            {
                try
                {
                    var userInterfaceFactory = new UpdateUserInterfaceFactory(updateManager);
                    var updateInterfaceWindow = userInterfaceFactory.CreateUpdateWindow();
                    updateInterfaceWindow.ShowDialog();
                }

                catch (Exception ex)
                {
                    Debug.WriteLine(ex);
                }

            }
            else
            {
                ApplyUpdateIfAvailableAsync(updateManager).Wait();
            }
        }
 public MainViewModel(UpdateManager updateManager)
 {
     _updateManager = updateManager;
     _userInterfaceFactory = new UpdateUserInterfaceFactory(updateManager);
 }