Exemplo n.º 1
0
 private static void ValidateUrl(string s)
 {
     try {
         UriValidator.ValidateHTTP(s);
     } catch (InvalidURLException e) {
         throw new FacilityException("", e);
     }
 }
        private static SolrCore GetCore(SolrServerElement server)
        {
            var id           = server.Id ?? Guid.NewGuid().ToString();
            var documentType = GetCoreDocumentType(server);
            var coreUrl      = GetCoreUrl(server);

            UriValidator.ValidateHTTP(coreUrl);
            return(new SolrCore(id, documentType, coreUrl));
        }
Exemplo n.º 3
0
        protected virtual string GetCoreUrl(ISolrServer server)
        {
            var url = server.Url;

            if (string.IsNullOrEmpty(url))
            {
                throw new StructureMapConfigurationException("Core url missing in SolrNet core configuration");
            }

            UriValidator.ValidateHTTP(url);
            return(url);
        }
 public SolrMoreLikeThisHandlerStreamUrlQuery(string url)
 {
     this.url = new Uri(UriValidator.ValidateHTTP(url));
 }