public override async Task<Tuple<bool, INuGetResource>> TryCreate(SourceRepository source, CancellationToken token)
        {
            UISearchResourceV3 curResource = null;
            var serviceIndex = await source.GetResourceAsync<ServiceIndexResourceV3>(token);

            if (serviceIndex != null)
            {
                var rawSearch = await source.GetResourceAsync<RawSearchResourceV3>(token);
                var metadataResource = await source.GetResourceAsync<UIMetadataResource>(token);

                curResource = new UISearchResourceV3(rawSearch, metadataResource);
            }

            return new Tuple<bool, INuGetResource>(curResource != null, curResource);
        }
        public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            UISearchResourceV3     curResource  = null;
            ServiceIndexResourceV3 serviceIndex = await source.GetResourceAsync <ServiceIndexResourceV3>(token);

            if (serviceIndex != null)
            {
                var rawSearch = await source.GetResourceAsync <RawSearchResourceV3>(token);

                var metadataResource = await source.GetResourceAsync <UIMetadataResource>(token);

                curResource = new UISearchResourceV3(rawSearch, metadataResource);
            }

            return(new Tuple <bool, INuGetResource>(curResource != null, curResource));
        }
 public PSSearchResourceV3(UISearchResourceV3 searchResource)
 {
     _searchResource = searchResource;
 }
Beispiel #4
0
 public PSSearchResourceV3(UISearchResourceV3 searchResource)
 {
     _searchResource = searchResource;
 }