Skip to content

Commit

Permalink
started to tackle NEST warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Jun 2, 2019
1 parent 36c5032 commit 2163889
Show file tree
Hide file tree
Showing 636 changed files with 278 additions and 912 deletions.
1 change: 1 addition & 0 deletions src/Elasticsearch.sln
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ProjectSection(SolutionItems) = preProject
..\appveyor.yml = ..\appveyor.yml
..\global.json = ..\global.json
..\azure-pipelines.yml = ..\azure-pipelines.yml
Elasticsearch.sln.DotSettings = Elasticsearch.sln.DotSettings
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Nuget", "Nuget", "{C7865979-1D1C-46AF-BDE8-1DA6F3ED81B3}"
Expand Down
13 changes: 12 additions & 1 deletion src/Elasticsearch.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,19 @@
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=PropertyBody/@EntryIndexedValue">Default body (from options)</s:String>
<s:Boolean x:Key="/Default/CodeStyle/IntroduceVariableUseVar/UseVarForIntroduceVariableRefactoring/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/LiveTemplatesUseVar/UseVar/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BM/@EntryIndexedValue">BM</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CPU/@EntryIndexedValue">CPU</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DFI/@EntryIndexedValue">DFI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DFR/@EntryIndexedValue">DFR</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IO/@EntryIndexedValue">IO</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OS/@EntryIndexedValue">OS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=VM/@EntryIndexedValue">VM</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OSCPU/@EntryIndexedValue">OSCPU</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=KM/@EntryIndexedValue">KM</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SSL/@EntryIndexedValue">SSL</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UUID/@EntryIndexedValue">UUID</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HDR/@EntryIndexedValue">HDR</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=TDigest/@EntryIndexedValue">TDigest</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpFileLayoutPatternsUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -483,4 +493,5 @@
<s:String x:Key="/Default/PatternsAndTemplates/Todo/TodoPatterns/=B68C83B0AE11204AAA509A6033251E74/TodoIconStyle/@EntryValue">Warning</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=elasticsearch/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Rethrottle/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Rethrottle/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Upsert/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
3 changes: 3 additions & 0 deletions src/Nest/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.cs]
resharper_check_namespace_highlighting=do_not_show
resharper_inheritdoc_invalid_usage_highlighting=do_not_show
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Aggregate.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/AggregateDictionary.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/AggregateDictionaryFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
16 changes: 4 additions & 12 deletions src/Nest/Aggregations/AggregateFormatter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using Elasticsearch.Net;
using Elasticsearch.Net.Extensions;
using Elasticsearch.Net.Utf8Json;
using Elasticsearch.Net.Utf8Json.Internal;
Expand Down Expand Up @@ -591,13 +591,11 @@ private IAggregate GetValueAggregate(ref JsonReader reader, IJsonFormatterResolv
token = reader.GetCurrentJsonToken();

if (token == JsonToken.EndObject)
{
return new ValueAggregate
{
Value = value,
ValueAsString = valueAsString
};
}

reader.ReadNext(); // ,
propertyName = reader.ReadPropertyNameSegmentRaw();
Expand Down Expand Up @@ -698,17 +696,14 @@ public IBucket GetRangeBucket(ref JsonReader reader, IJsonFormatterResolver form

IBucket bucket;
if (fromString != null || toString != null)
{
bucket = new IpRangeBucket(subAggregates)
{
Key = key,
DocCount = docCount.GetValueOrDefault(),
From = fromString,
To = toString,
};
}
else
{
bucket = new RangeBucket(subAggregates)
{
Key = key,
Expand All @@ -718,7 +713,6 @@ public IBucket GetRangeBucket(ref JsonReader reader, IJsonFormatterResolver form
FromAsString = fromAsString,
ToAsString = toAsString,
};
}

return bucket;
}
Expand Down Expand Up @@ -792,7 +786,7 @@ private IBucket GetKeyedBucket(ref JsonReader reader, IJsonFormatterResolver for
switch (propertyName)
{
case Parser.Score:
return GetSignificantTermsBucket(ref reader, formatterResolver, key, keyAsString, docCount);
return GetSignificantTermsBucket(ref reader, formatterResolver, key, docCount);
case Parser.DocCountErrorUpperBound:
{
docCountErrorUpperBound = reader.ReadNullableLong();
Expand Down Expand Up @@ -840,7 +834,7 @@ private IBucket GetCompositeBucket(ref JsonReader reader, IJsonFormatterResolver
return new CompositeBucket(nestedAggregates, key) { DocCount = docCount };
}

private IBucket GetSignificantTermsBucket(ref JsonReader reader, IJsonFormatterResolver formatterResolver, object key, string keyAsString,
private IBucket GetSignificantTermsBucket(ref JsonReader reader, IJsonFormatterResolver formatterResolver, object key,
long? docCount
)
{
Expand Down Expand Up @@ -880,6 +874,7 @@ private IBucket GetFiltersBucket(ref JsonReader reader, IJsonFormatterResolver f
};
}

[SuppressMessage("ReSharper", "MemberHidesStaticFromOuterClass")]
private static class Parser
{
public const string AfterKey = "after_key";
Expand All @@ -902,12 +897,10 @@ private static class Parser
public const string KeyAsString = "key_as_string";
public const string Keys = "keys";
public const string Location = "location";
public const string Lower = "lower";
public const string MaxScore = "max_score";
public const string Meta = "meta";

public const string Score = "score";
public const string StdDeviationBoundsAsString = "std_deviation_bounds_as_string";

public const string SumOtherDocCount = "sum_other_doc_count";
public const string To = "to";
Expand All @@ -917,7 +910,6 @@ private static class Parser

public const string Total = "total";

public const string Upper = "upper";
public const string Value = "value";

public const string ValueAsString = "value_as_string";
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Aggregation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/AggregationContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;
using Elasticsearch.Net.Utf8Json.Internal;
using Elasticsearch.Net.Utf8Json.Resolvers;
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Composite/CompositeBucket.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Filter/FilterAggregation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;
using Elasticsearch.Net.Utf8Json;

namespace Nest
{
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Filters/FiltersAggregation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Global/GlobalAggregation.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
3 changes: 1 addition & 2 deletions src/Nest/Aggregations/Bucket/Histogram/HistogramOrder.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;
using Elasticsearch.Net.Utf8Json;

namespace Nest
{
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/IpRange/IpRangeAggregation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Missing/MissingAggregation.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Nested/NestedAggregation.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Parent/ParentAggregation.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Range/RangeAggregation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Linq.Expressions;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
1 change: 0 additions & 1 deletion src/Nest/Aggregations/Bucket/Sampler/SamplerAggregation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;

namespace Nest
Expand Down
Loading

0 comments on commit 2163889

Please sign in to comment.