public V3SimpleSearchResource(V3RawSearchResource rawSearch) { if (rawSearch == null) { throw new ArgumentNullException("rawSearch"); } _rawSearch = rawSearch; }
public async Task <INuGetResource> Create(SourceRepository source) { V3RawSearchResource curResource = null; V3ServiceIndexResource serviceIndex = await source.GetResource <V3ServiceIndexResource>(); if (serviceIndex != null) { var endpoints = serviceIndex["SearchQueryService"].ToArray(); if (endpoints.Length > 0) { HttpHandlerResource handler = await source.GetResource <HttpHandlerResource>(); // construct a new resource curResource = new V3RawSearchResource(handler.MessageHandler, endpoints); } } return(curResource); }