Exemplo n.º 1
0
        public IndexStore(string entityUrl, FindConfiguration config)
        {
            var serviceUrl = config.ServiceUrl.Trim();

            if (serviceUrl.EndsWith("/"))
            {
                serviceUrl = serviceUrl.Remove(serviceUrl.Length - 1);
            }
            var index = config.DefaultIndex;

            BaseUrl           = $"{serviceUrl}/{index}/{entityUrl}";
            ListUrlTemplate   = BaseUrl + "/list?from={0}&size={1}&tags=" + Helpers.SiteIdTag + "{2}," + Helpers.LanguageTag + "{3}";
            GetUrlTemplate    = BaseUrl + "/{0}";
            DeleteUrlTemplate = BaseUrl + "/{0}";
            CreateUrlTemplate = BaseUrl;

            RequestFactory    = new JsonRequestFactory(config.DefaultRequestTimeout);
            DefaultSerializer = Serializer.CreateDefault();
        }
Exemplo n.º 2
0
 public IndexStoreTestContext()
 {
     TestConfiguration = new FindConfiguration("http://myfindurl", "myindex", null);
     StoreFactory      = new StoreFactory(TestConfiguration);
 }
 public StoreFactory(FindConfiguration configuration)
 {
     _configuration = configuration;
 }
 public IndexStoreTestContext()
 {
     TestConfiguration = new FindConfiguration("http://myfindurl", "myindex", null);
     StoreFactory = new StoreFactory(TestConfiguration);
 }