private void SearchPackageInActivePackageSource(string searchText)
        {
            var activeSource     = _sourceRepoList.SelectedItem as PackageSource;
            var sourceRepository = Sources.CreateSourceRepository(activeSource);

            Filter filter = Filter.All;

            if (Resx.Resources.Filter_Installed.Equals(_filter.SelectedItem))
            {
                filter = Filter.Installed;
            }
            else if (Resx.Resources.Filter_UpdateAvailable.Equals(_filter.SelectedItem))
            {
                filter = Filter.UpdatesAvailable;
            }
            PackageLoaderOption option = new PackageLoaderOption(
                filter,
                IncludePrerelease);

            var loader = new PackageLoader(
                sourceRepository,
                Target,
                option,
                searchText);

            _packageList.Loader = loader;
        }
Exemplo n.º 2
0
        public PackageLoader(
            SourceRepository source,
            InstallationTarget target,
            PackageLoaderOption option,
            string searchText)
        {
            _target     = target;
            _option     = option;
            _source     = source;
            _searchText = searchText;

            LoadingMessage = string.IsNullOrWhiteSpace(searchText) ?
                             Resx.Resources.Text_Loading :
                             string.Format(
                CultureInfo.CurrentCulture,
                Resx.Resources.Text_Searching,
                searchText);
        }
Exemplo n.º 3
0
        public PackageLoader(
            SourceRepository source,
            InstallationTarget target,
            PackageLoaderOption option,
            string searchText)
        {
            _target = target;
            _option = option;
            _source = source;
            _searchText = searchText;

            LoadingMessage = string.IsNullOrWhiteSpace(searchText) ?
                Resx.Resources.Text_Loading :
                string.Format(
                    CultureInfo.CurrentCulture,
                    Resx.Resources.Text_Searching,
                    searchText);
        }
        private void SearchPackageInActivePackageSource(string searchText)
        {
            var activeSource = _sourceRepoList.SelectedItem as PackageSource;
            var sourceRepository = Sources.CreateSourceRepository(activeSource);

            Filter filter = Filter.All;
            if (Resx.Resources.Filter_Installed.Equals(_filter.SelectedItem))
            {
                filter = Filter.Installed;
            }
            else if (Resx.Resources.Filter_UpdateAvailable.Equals(_filter.SelectedItem))
            {
                filter = Filter.UpdatesAvailable;
            }
            PackageLoaderOption option = new PackageLoaderOption(
                filter,
                IncludePrerelease);

            var loader = new PackageLoader(
                sourceRepository,
                Target,
                option,
                searchText);
            _packageList.Loader = loader;
        }