Skip to content

[Backport 8.3] Reduce initial API surface #6708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions benchmarks/Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
using Elastic.Clients.Elasticsearch;
using Elastic.Clients.Elasticsearch.Enrich;
using Elastic.Clients.Elasticsearch.QueryDsl;
using Elastic.Transport;
using Nest;
using System.Globalization;
using System.Text;
using Policy = Elastic.Clients.Elasticsearch.Enrich.Policy;

var config = ManualConfig.Create(DefaultConfig.Instance);
config.SummaryStyle = new SummaryStyle(CultureInfo.CurrentCulture, true, BenchmarkDotNet.Columns.SizeUnit.B, null);
Expand Down
622 changes: 1 addition & 621 deletions src/Elastic.Clients.Elasticsearch/Common/Query/Query.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,32 @@

namespace Elastic.Clients.Elasticsearch
{
internal sealed class PercentageConverter : JsonConverter<Percentage>
{
public override Percentage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var token = reader.TokenType;
//internal sealed class PercentageConverter : JsonConverter<Percentage>
//{
// public override Percentage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
// {
// var token = reader.TokenType;

switch (token)
{
case JsonTokenType.String:
{
var value = reader.GetString();
var result = (Percentage)Activator.CreateInstance(typeof(Percentage), value);
return result;
}
case JsonTokenType.Number:
{
var value = reader.GetSingle();
var result = (Percentage)Activator.CreateInstance(typeof(Percentage), value);
return result;
}
}
// switch (token)
// {
// case JsonTokenType.String:
// {
// var value = reader.GetString();
// var result = (Percentage)Activator.CreateInstance(typeof(Percentage), value);
// return result;
// }
// case JsonTokenType.Number:
// {
// var value = reader.GetSingle();
// var result = (Percentage)Activator.CreateInstance(typeof(Percentage), value);
// return result;
// }
// }

throw new SerializationException();
}
// throw new SerializationException();
// }

public override void Write(Utf8JsonWriter writer, Percentage value, JsonSerializerOptions options) =>
throw new NotImplementedException();
}


// public override void Write(Utf8JsonWriter writer, Percentage value, JsonSerializerOptions options) =>
// throw new NotImplementedException();
//}
}
193 changes: 1 addition & 192 deletions src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading