internal static SearchServiceStatistics DeserializeSearchServiceStatistics(JsonElement element) { SearchServiceStatistics result = new SearchServiceStatistics(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("counters")) { result.Counters = SearchServiceCounters.DeserializeSearchServiceCounters(property.Value); continue; } if (property.NameEquals("limits")) { result.Limits = SearchServiceLimits.DeserializeSearchServiceLimits(property.Value); continue; } } return(result); }
internal static SearchServiceStatistics DeserializeSearchServiceStatistics(JsonElement element) { SearchServiceCounters counters = default; SearchServiceLimits limits = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("counters")) { counters = SearchServiceCounters.DeserializeSearchServiceCounters(property.Value); continue; } if (property.NameEquals("limits")) { limits = SearchServiceLimits.DeserializeSearchServiceLimits(property.Value); continue; } } return(new SearchServiceStatistics(counters, limits)); }