Exemple #1
0
        private async void SearchPackageInActivePackageSource(string searchText)
        {
            var    filterItem = _filter.SelectedItem as FilterItem;
            Filter filter     = filterItem != null ?
                                filterItem.Filter :
                                Filter.All;

            PackageLoaderOption option = new PackageLoaderOption(filter, IncludePrerelease);
            var loader = new PackageLoader(
                option,
                Model.Context.PackageManager,
                Model.Context.Projects,
                _activeSource,
                searchText);
            await loader.Initialize();

            _packageList.Load(loader);
        }
        public PackageLoader(PackageLoaderOption option,
                             NuGetPackageManager packageManager,
                             IEnumerable <NuGetProject> projects,
                             SourceRepository sourceRepository,
                             string searchText)
        {
            _sourceRepository = sourceRepository;
            _packageManager   = packageManager;
            _projects         = projects.ToArray();
            _option           = option;
            _searchText       = searchText;

            LoadingMessage = string.IsNullOrWhiteSpace(searchText) ?
                             Resources.Text_Loading :
                             string.Format(
                CultureInfo.CurrentCulture,
                Resources.Text_Searching,
                searchText);

            _installedPackages   = new HashSet <PackageIdentity>(PackageIdentity.Comparer);
            _installedPackageIds = new HashSet <string>(StringComparer.OrdinalIgnoreCase);
        }
        public PackageLoader(PackageLoaderOption option,
            NuGetPackageManager packageManager,
            IEnumerable<NuGetProject> projects,
            SourceRepository sourceRepository,
            string searchText)
        {
            _sourceRepository = sourceRepository;
            _packageManager = packageManager;
            _projects = projects.ToArray();
            _option = option;
            _searchText = searchText;

            LoadingMessage = string.IsNullOrWhiteSpace(searchText) ?
                Resources.Text_Loading :
                string.Format(
                    CultureInfo.CurrentCulture,
                    Resources.Text_Searching,
                    searchText);

            _installedPackages = new HashSet<PackageIdentity>(PackageIdentity.Comparer);
            _installedPackageIds = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
        }
        private async void SearchPackageInActivePackageSource(string searchText)
        {
            var filterItem = _filter.SelectedItem as FilterItem;
            Filter filter = filterItem != null ?
                filterItem.Filter :
                Filter.All;

            PackageLoaderOption option = new PackageLoaderOption(filter, IncludePrerelease);
            var loader = new PackageLoader(
                option,
                Model.Context.PackageManager,
                Model.Context.Projects,
                _activeSource,
                searchText);
            await loader.Initialize();
            _packageList.Load(loader);
        }