public void Serialize_Deserialize_IndexedClass()
        {
            var serialized   = JsonConvert.SerializeObject(_objects, JsonHelpers.CreateSerializerSettings());
            var deserialized =
                JsonConvert.DeserializeObject <List <IndexedClass> >(serialized, JsonHelpers.CreateSerializerSettings());

            Assert.AreEqual(_objects.Count, deserialized.Count);
        }
        /// <summary>
        /// To json.
        /// </summary>
        /// <param name="aq">The aq.</param>
        /// <param name="debug">if set to <c>true</c> [debug].</param>
        /// <returns>Json string</returns>
        public static string ToJson <T>(this Query <T> aq, bool debug = false)
        {
            var jsonSerializerSettings = JsonHelpers.CreateSerializerSettings();

            return(debug ?
                   JsonConvert.SerializeObject(aq, Formatting.Indented, jsonSerializerSettings) :
                   JsonConvert.SerializeObject(aq, jsonSerializerSettings));
        }
 /// <summary>
 /// To json.
 /// </summary>
 /// <param name="aq">The aq.</param>
 /// <param name="debug">if set to <c>true</c> [debug].</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <returns>Json string</returns>
 public static string ToJson(this object aq, bool debug = false, JsonSerializerSettings jsonSerializerSettings = null)
 {
     if (jsonSerializerSettings.IsNull())
     {
         jsonSerializerSettings = JsonHelpers.CreateSerializerSettings();
     }
     return(debug ?
            JsonConvert.SerializeObject(aq, Formatting.Indented, jsonSerializerSettings) :
            JsonConvert.SerializeObject(aq, jsonSerializerSettings));
 }
Beispiel #4
0
        /// <summary>
        /// Clones the specified source.
        /// </summary>
        /// <typeparam name="T">Type of T</typeparam>
        /// <param name="source">The source.</param>
        /// <returns>A clone of the object.</returns>
        public static T Clone <T>(T source)
            where T : new()
        {
            var jsonSerializerSettings = JsonHelpers.CreateSerializerSettings();

            jsonSerializerSettings.TypeNameHandling = TypeNameHandling.All;
            var serialized = JsonConvert.SerializeObject(source, jsonSerializerSettings);

            return(JsonConvert.DeserializeObject <T>(serialized, jsonSerializerSettings));
        }
        public void Result_without_filtered_aggregation()
        {
            var result = "{\"took\":0,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0},\"hits\":" +
                         "{\"total\":1501,\"max_score\":0,\"hits\":[]},\"aggregations\":{\"terms_Type\":{\"doc_count_error_upper_bound\":0," +
                         "\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"EarthFault\",\"doc_count\":1431,\"Cardinality\":{\"value\":1295}}," +
                         "{\"key\":\"EarthFaultRen1\",\"doc_count\":66,\"Cardinality\":{\"value\":66}},{\"key\":\"EarthFaultRen3\",\"doc_count\":" +
                         "4,\"Cardinality\":{\"value\":4}}]}}}";

            var js           = JsonHelpers.CreateSerializerSettings();
            var resultObject = JsonConvert.DeserializeObject <DocumentSearchResult <Event> >(result, js);
        }
        public void Serialize_Deserialize_IndexedClass_TypeMissing()
        {
            var settings = JsonHelpers.CreateSerializerSettings();

            settings.TypeNameHandling = TypeNameHandling.None;
            var serialized   = JsonConvert.SerializeObject(_objects, settings);
            var deserialized =
                JsonConvert.DeserializeObject <List <IndexedClass> >(serialized, JsonHelpers.CreateSerializerSettings());

            Assert.AreEqual(_objects.Count, deserialized.Count);
        }
Beispiel #7
0
        public void TopHitsResult_Json()
        {
            string json;

            using (StreamReader r = new StreamReader("Support/tophitsresult.json"))
            {
                json = r.ReadToEnd();
            }

            var obj = JsonConvert.DeserializeObject <SearchResult <Event> >(json, JsonHelpers.CreateSerializerSettings());
        }
        public void FilteredAggregationResult()
        {
            var json =
                "{\"took\":1,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0},\"hits\":{\"total\":841,\"max_score\":0,\"hits\":[]},\"aggregations\":" +
                "{\"agg_filter\":{\"doc_count\":3414,\"nested_Events_0\":{\"doc_count\":42,\"nested\":{\"buckets\":[{\"key_as_string\":\"2018-08-27T00:00:00.000Z\",\"key\":1535328000000,\"doc_count\":1," +
                "\"nested\":{\"doc_count_error_upper_bound\":0,\"sum_other_doc_count\":0,\"buckets\":[]}},{\"key_as_string\":\"2018-08-20T00:00:00.000Z\",\"key\":1534723200000,\"doc_count\":0,\"nested\":{" +
                "\"doc_count_error_upper_bound\":0,\"sum_other_doc_count\":0,\"buckets\":[]}}]}}}}}";

            var result =
                JsonConvert.DeserializeObject <DocumentSearchResult <object> >(json,
                                                                               JsonHelpers.CreateSerializerSettings());

            Assert.AreEqual(42, result.Aggregations["nested_Events_0"].DocCount);
        }
Beispiel #9
0
        public void TopHits_Json()
        {
            var top = AggregationsHelper.TopHitsAggregation(
                ParameterHelper.Sort(
                    new KeyValuePair <Expression <Func <IndexedClass, object> >, AggsOrderDirection>(ic => ic.AString,
                                                                                                     AggsOrderDirection.Desc),
                    new KeyValuePair <Expression <Func <IndexedClass, object> >, AggsOrderDirection>(ic => ic.SomeNumber,
                                                                                                     AggsOrderDirection.Asc)
                    ),
                ParameterHelper.Include <IndexedClass>(ic => ic.ObjectId, ic => ic.MockEnum)
                );
            var json = JsonConvert.SerializeObject(top, JsonHelpers.CreateSerializerSettings());

            Assert.AreEqual("{\"top_hits\":{\"_source\":{\"includes\":[\"ObjectId\",\"MockEnum\"]},\"sort\":[{\"AString\":\"Desc\"},{\"SomeNumber\":\"Asc\"}]}}", json);
        }
        public void Result_without_filtered_and_unfiltered_aggregation()
        {
            var result = "{\"took\":1,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0},\"hits\":" +
                         "{\"total\":1501,\"max_score\":0,\"hits\":[]},\"aggregations\":{\"terms_Type\":{\"doc_count_error_upper_bound\":0," +
                         "\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"EarthFault\",\"doc_count\":1431,\"Cardinality\":{\"value\":1295}}," +
                         "{\"key\":\"EarthFaultRen1\",\"doc_count\":66,\"Cardinality\":{\"value\":66}},{\"key\":\"EarthFaultRen3\"," +
                         "\"doc_count\":4,\"Cardinality\":{\"value\":4}}]},\"agg_filter\":{\"doc_count\":70,\"EarthFaultRen1234\":{\"value\":66}}}}";

            var js           = JsonHelpers.CreateSerializerSettings();
            var resultObject = JsonConvert.DeserializeObject <DocumentSearchResult <Event> >(result, js);

            Assert.AreEqual(66, resultObject.Aggregations["EarthFaultRen1234"].Value);
            Assert.AreEqual(1295, resultObject.Aggregations["terms_Type"].Buckets.Single(b => b.Key == "EarthFault").Cardinality.Value);
            Assert.AreEqual(66, resultObject.Aggregations["terms_Type"].Buckets.Single(b => b.Key == "EarthFaultRen1").Cardinality.Value);
            Assert.AreEqual(4, resultObject.Aggregations["terms_Type"].Buckets.Single(b => b.Key == "EarthFaultRen3").Cardinality.Value);
        }
        public void Result_nested_aggs_with_tophits()
        {
            var result = "{\"took\":5,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0},\"hits\":" +
                         "{\"total\":399,\"max_score\":0,\"hits\":[]},\"aggregations\":{\"terms_Asset.Name\":{\"doc_count_error_upper_bound\":" +
                         "6,\"sum_other_doc_count\":396,\"buckets\":[{\"key\":\"A063\",\"doc_count\":3,\"nested\":{\"doc_count_error_upper_bound\":" +
                         "0,\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"EarthFaultRen1\",\"doc_count\":1,\"TopHits\":{\"hits\":" +
                         "{\"total\":1,\"max_score\":null,\"hits\":[{\"_index\":\"h73dev_h73_earthfault_earthfaultevent\",\"_type\":" +
                         "\"h73.EarthFault.EarthFaultEvent\",\"_id\":\"323e3b4b-bbef-42be-b4e4-e0768f2302f9_EarthFaultRen1_636777437920937727\"," +
                         "\"_score\":null,\"_source\":{\"Type\":\"EarthFaultRen1\",\"Start\":\"2018-11-13T22:09:52.0937727+01:00\",\"Asset\":" +
                         "{\"ParticipantId\":1,\"Description\":\"Berghaug\",\"ValidTo\":\"2115-01-07T19:17:13.867\",\"StSrid\":4326,\"Long\":" +
                         "\"10.05398\",\"ValidFrom\":\"1915-01-07T19:17:13.867\",\"Id\":44866,\"AssetGuid\":\"323e3b4b-bbef-42be-b4e4-e0768f2302f9\"" +
                         ",\"GeoLocation\":{\"lon\":10.05398,\"lat\":60.20509},\"Lat\":\"60.20509\",\"Name\":\"A063\"},\"EventIdGuid\":" +
                         "\"323e3b4b-bbef-42be-b4e4-e0768f2302f9_EarthFaultRen1_636777437920937727\",\"End\":\"2018-11-15T02:28:30.637983+01:00\"," +
                         "\"Duration\":1698.642403505},\"sort\":[1542143392093]}]}}}]}}]}}}";

            var js           = JsonHelpers.CreateSerializerSettings();
            var resultObject = JsonConvert.DeserializeObject <DocumentSearchResult <EarthFaultEvent> >(result, js);
        }
        public void Aggregations_Nested_Get2()
        {
            var jsonData =
                "{\"took\":32,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0},\"hits\":{\"total\":841,\"max_score\":0,\"hits\":[]}" +
                ",\"aggregations\":{\"nested_Children_0\":{\"doc_count\":33549,\"nested\":{\"buckets\":[{\"key_as_string\":\"2018-10-22T00:00:00.000Z\",\"key\":1540166400000," +
                "\"doc_count\":38,\"nested\":{\"doc_count_error_upper_bound\":0,\"sum_other_doc_count\":26,\"buckets\":[]}},{\"key_as_string\":\"2018-10-15T00:00:00.000Z\"," +
                "\"key\":1539561600000,\"doc_count\":149,\"nested\":{\"doc_count_error_upper_bound\":-1,\"sum_other_doc_count\":129,\"buckets\":[{\"key\":\"505ad21c-9cb7-4c17-99a8-a193f248986c\"," +
                "\"doc_count\":2,\"sum\":{\"value\":3798}},{\"key\":\"cc3dfb17-b653-4627-b8c1-98afa752ae92\",\"doc_count\":2,\"sum\":{\"value\":3044}},{\"key\":\"63475d9a-3b48-4196-a287-1d1788b311ad\"," +
                "\"doc_count\":2,\"sum\":{\"value\":2735}},{\"key\":\"35bea27a-f44c-4c43-86f4-ce1a97104d1d\",\"doc_count\":2,\"sum\":{\"value\":2676}}]}}]}}}}";

            var searchResult =
                JsonConvert.DeserializeObject <DocumentSearchResult <IndexedClass> >(jsonData,
                                                                                     JsonHelpers.CreateSerializerSettings());

            var agg   = searchResult.NestedAggregation(asset => asset.Children);
            var agg2  = agg.Nested.Buckets.SelectMany(b => b.Nested.Buckets).Select(nb => new { nb.Key });
            var dist  = agg2.Distinct();
            var count = dist.Count();

            Assert.AreEqual(33549, agg.DocCount);
            Assert.AreEqual("505ad21c-9cb7-4c17-99a8-a193f248986c", agg2.First().Key);
            Assert.AreEqual(4, count);
        }
Beispiel #13
0
        /// <summary>
        /// Scrolls asynchronous.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="assetSearchResult">The asset search result.</param>
        /// <param name="jsonSerializerSettings">The json serializer settings.</param>
        /// <returns>DocumentSearchResult of T</returns>
        /// <exception cref="MissingValuesException">
        /// Search result missing ScrollId
        /// or
        /// Search result missing _Query. When searching set returnQuery to true.
        /// or
        /// Search result missing _Query's Scroll. When searching set returnQuery to true and remember to activate scrolling by using .SetScroll().
        /// </exception>
        public async Task <DocumentSearchResult <T> > ScrollAsync(ElasticClient client, DocumentSearchResult <T> assetSearchResult, JsonSerializerSettings jsonSerializerSettings = null)
        {
            if (string.IsNullOrEmpty(assetSearchResult.ScrollId))
            {
                throw new MissingValuesException("Search result missing ScrollId");
            }

            if (assetSearchResult.Query == null)
            {
                throw new MissingValuesException(
                          "Search result missing _Query. When searching set returnQuery to true.");
            }

            if (assetSearchResult.Query.Scroll == null)
            {
                throw new MissingValuesException(
                          "Search result missing _Query's Scroll. When searching set returnQuery to true and remember to activate scrolling by using .SetScroll().");
            }

            var body     = new { scroll = assetSearchResult.Query.Scroll, scroll_id = assetSearchResult.ScrollId };
            var response = await client.Client.DoRequestAsync <StringResponse>(HttpMethod.POST, $"{Core.Const.Strings.ScrollPath}", new CancellationToken(false), body.ToJson(jsonSerializerSettings: jsonSerializerSettings));

            CheckResponse(response);
            var result =
                JsonConvert.DeserializeObject <DocumentSearchResult <T> >(response.Body, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings());

            result.Query = assetSearchResult.Query;

            return(result);
        }
Beispiel #14
0
 /// <summary>
 /// Counts asynchronous.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="query">The query.</param>
 /// <param name="token">The token.</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <returns>SearchResult of T</returns>
 public async Task <SearchResult <T> > CountAsync(ElasticClient client, Query <T> query, CancellationToken token, JsonSerializerSettings jsonSerializerSettings = null)
 {
     return(await DoAsync(client, query, Core.Const.Strings.CountPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, token));
 }
Beispiel #15
0
        /// <summary>
        /// Searches asynchronous.
        /// </summary>
        /// <typeparam name="T2">The type of the 2.</typeparam>
        /// <param name="client">The client.</param>
        /// <param name="query">The query.</param>
        /// <param name="selector">The selector.</param>
        /// <param name="token">The token.</param>
        /// <param name="jsonSerializerSettings">The json serializer settings.</param>
        /// <returns>SearchResult of T2</returns>
        public async Task <SearchResult <T2> > SearchAsync <T2>(ElasticClient client, Query <T> query, Func <T, T2> selector, CancellationToken token, JsonSerializerSettings jsonSerializerSettings = null)
            where T2 : class
        {
            var result = await DoAsync(client, query, Core.Const.Strings.SearchPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, token);

            var output = result?.SelectResult(selector);

            return(output);
        }
Beispiel #16
0
 /// <summary>
 /// Counts.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="query">The query.</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <returns>SearchResult of T</returns>
 public SearchResult <T> Count(ElasticClient client, Query <T> query, JsonSerializerSettings jsonSerializerSettings = null)
 {
     return(Do(client, query, Core.Const.Strings.CountPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, false));
 }
Beispiel #17
0
        /// <summary>
        /// Searches.
        /// </summary>
        /// <typeparam name="T2">The type of the 2.</typeparam>
        /// <param name="client">The client.</param>
        /// <param name="query">The query.</param>
        /// <param name="selector">The selector.</param>
        /// <param name="jsonSerializerSettings">The json serializer settings.</param>
        /// <param name="returnQuery">if set to <c>true</c> [return query].</param>
        /// <returns>SearchResult of T2</returns>
        public SearchResult <T2> Search <T2>(ElasticClient client, Query <T> query, Func <T, T2> selector, JsonSerializerSettings jsonSerializerSettings = null, bool returnQuery = false)
            where T2 : class
        {
            var result = Do(client, query, Core.Const.Strings.SearchPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, returnQuery);
            var output = result?.SelectResult(selector);

            return(output);
        }
Beispiel #18
0
 /// <summary>
 /// Searches.
 /// </summary>
 /// <typeparam name="T2">The type of the 2.</typeparam>
 /// <param name="client">The client.</param>
 /// <param name="query">The query.</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <returns>SearchResult of T2</returns>
 public SearchResult <T2> Search <T2>(ElasticClient client, Query <T> query, JsonSerializerSettings jsonSerializerSettings = null)
     where T2 : class
 {
     return(Do <T2>(client, query, Core.Const.Strings.SearchPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST));
 }
        public void BucketSelector_Terms_TopHits_Result()
        {
            var json = "{\"took\":9,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0}" +
                       ",\"hits\":{\"total\":1330,\"max_score\":0,\"hits\":[]},\"aggregations\":" +
                       "{\"terms_AssetGuid\":{\"doc_count_error_upper_bound\":3,\"sum_other_doc_count\":1203,\"buckets\":[" +
                       "{\"key\":\"9af4387b-cecb-42e6-9e4b-a8bbca4cc662\",\"doc_count\":5,\"nested\":" +
                       "{\"buckets\":[{\"key\":\"Above120\",\"from\":120,\"doc_count\":1,\"tophits\":{\"hits\":{\"total\":1," +
                       "\"max_score\":null,\"hits\":[{\"_index\":\"h73dev_h73_core_event\",\"_type\":\"h73.Elastic.Search.Tests.IndexedClass\"," +
                       "\"_id\":\"9af4387b-cecb-42e6-9e4b-a8bbca4cc662_EarthFault_636630941494510178\",\"_score\":null,\"_source\":{\"SomeNumber\":1," +
                       "\"ObjectId\":\"00000000-0000-0000-0000-000000000001\",\"AString\":\"AString1\",\"Child\":null,\"Children\":null," +
                       "\"DateTimeNotNullable\":\"2018-11-07T00:00:00\",\"DateTimeNullable\":\"2018-11-07T00:00:00\",\"ListStrings\":null," +
                       "\"MockEnum\":0,\"MetaData\":null},\"sort\":[1527497349451]}]}},\"cardinality\":{\"value\":1}}]}}]}}}";

            var deserialized = JsonConvert.DeserializeObject <SearchResult <IndexedClass> >(json, JsonHelpers.CreateSerializerSettings());
            var tophit       = deserialized.Aggregations.FirstOrDefault().Value.Buckets.FirstOrDefault().Nested.Buckets.FirstOrDefault().TopHits <IndexedClass>().Hits.HitsList.FirstOrDefault().Source;

            Assert.IsTrue(tophit is IndexedClass);
        }
Beispiel #20
0
 /// <summary>
 /// Searches.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="query">The query.</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <param name="returnQuery">if set to <c>true</c> [return query].</param>
 /// <returns>DocumentSearchResult of T</returns>
 public DocumentSearchResult <T> Search(ElasticClient client, Query <T> query, JsonSerializerSettings jsonSerializerSettings = null, bool returnQuery = false)
 {
     return(Do(client, query, Core.Const.Strings.SearchPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, returnQuery));
 }
Beispiel #21
0
 /// <summary>
 /// Multiple searches asynchronous.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="queries">The queries.</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <param name="returnQueries">if set to <c>true</c> [return queries].</param>
 /// <returns>List of DocumentSearchResult of T</returns>
 public async Task <List <DocumentSearchResult <T> > > MultipleSearchAsync(ElasticClient client, MultipleQuery <T> queries, JsonSerializerSettings jsonSerializerSettings = null, bool returnQueries = false)
 {
     return(await DoAync(client, queries, Core.Const.Strings.MultiSearchPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, returnQueries));
 }
Beispiel #22
0
 /// <summary>
 /// Searches asynchronous.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="query">The query.</param>
 /// <param name="jsonSerializerSettings">The json serializer settings.</param>
 /// <param name="returnQuery">if set to <c>true</c> [return query].</param>
 /// <returns>DocumentSearchResult of T</returns>
 public async Task <DocumentSearchResult <T> > SearchAsync <T2>(ElasticClient client, Query <T> query, JsonSerializerSettings jsonSerializerSettings = null, bool returnQuery = false) where T2 : class
 {
     return(await DoAsync <T2>(client, query, Core.Const.Strings.SearchPath, jsonSerializerSettings ?? JsonHelpers.CreateSerializerSettings(), HttpMethod.POST, returnQuery));
 }
        public void VqResult_01()
        {
            var result = "{\"took\":31,\"timed_out\":false,\"_shards\":{\"total\":3,\"successful\":3,\"skipped\":0,\"failed\":0},\"hits\":{\"total\":50888,\"max_score\":0,\"hits\":[]},\"aggregations\":" +
                         "{\"agg_filter_1\":{\"meta\":{},\"doc_count\":100,\"EventTypesSub\":{\"doc_count_error_upper_bound\":0,\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"UnderVoltage\"," +
                         "\"doc_count\":96,\"Cardinality\":{\"value\":65}},{\"key\":\"OverVoltage\",\"doc_count\":4,\"Cardinality\":{\"value\":3}}]},\"WorkOrderStateSub\":{\"doc_count_error_upper_bound\"" +
                         ":0,\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"New\",\"doc_count\":100}]}},\"cardinality_Asset.AssetGuid\":{\"value\":23062},\"agg_filter_0\":{\"meta\":{},\"doc_count\":547," +
                         "\"EventTypesAmi\":{\"doc_count_error_upper_bound\":0,\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"UnderVoltage\",\"doc_count\":506,\"Cardinality\":{\"value\":506}},{\"key\":" +
                         "\"OverVoltage\",\"doc_count\":41,\"Cardinality\":{\"value\":41}}]},\"WorkOrderStateAmi\":{\"doc_count_error_upper_bound\":0,\"sum_other_doc_count\":0,\"buckets\":[{\"key\":\"New\"," +
                         "\"doc_count\":547}]}}}}";

            var obj = JsonConvert.DeserializeObject <DocumentSearchResult <VoltageQualityEvent> >(result, JsonHelpers.CreateSerializerSettings());
        }