public override async Task<Tuple<bool, INuGetResource>> TryCreate(SourceRepository source, CancellationToken token)
        {
            PSSearchResource resource = null;
            UISearchResource uiSearchResource = await source.GetResourceAsync<UISearchResource>(token);
            if (uiSearchResource != null)
            {
                resource = new PowerShellSearchResourceV2(uiSearchResource);
            }

            return new Tuple<bool, INuGetResource>(resource != null, resource);
        }
Exemple #2
0
        public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            PSSearchResource resource         = null;
            UISearchResource uiSearchResource = await source.GetResourceAsync <UISearchResource>(token);

            if (uiSearchResource != null)
            {
                resource = new PowerShellSearchResourceV2(uiSearchResource);
            }

            return(new Tuple <bool, INuGetResource>(resource != null, resource));
        }