Skip to content

Commit 8109adb

Browse files
committed
updated projects to exclude xmldoc warnings (they add little value and push more interesting warnings into obscurity, fixed remaining warnings except for the ones that caused Elasticsearch.Net to be no longer CLSCompliant
1 parent d46a4e2 commit 8109adb

File tree

58 files changed

+237
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+237
-252
lines changed

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiGenerator.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ public static void PatchMethod(CsharpMethod method)
160160
method.DescriptorTypeGeneric = generic;
161161
else method.Unmapped = true;
162162

163-
164-
165-
166163
try
167164
{
168165
var typeName = "CodeGeneration.LowLevelClient.Overrides.Descriptors." + method.DescriptorType + "Overrides";
@@ -173,24 +170,30 @@ public static void PatchMethod(CsharpMethod method)
173170
if (overrides == null)
174171
return;
175172

173+
var globalQueryStringRenames = new Dictionary<string, string>
174+
{
175+
{"__source", "_source_enabled"},
176+
{"__source_include", "_source_include"},
177+
{"__source_exclude", "_source_exclude"},
178+
};
179+
var qs = overrides.RenameQueryStringParams ?? new Dictionary<string, string>();
180+
foreach (var kv in globalQueryStringRenames)
181+
qs[kv.Key] = kv.Value;
182+
176183
foreach (var kv in method.Url.Params)
177184
{
178185
if (overrides.SkipQueryStringParams.Contains(kv.Key))
179186
method.Url.Params.Remove(kv.Key);
180-
181-
if (overrides.RenameQueryStringParams == null) continue;
182187

188+
183189
string newName;
184-
if (!overrides.RenameQueryStringParams.TryGetValue(kv.Key, out newName))
190+
if (!qs.TryGetValue(kv.Key, out newName))
185191
continue;
186192

187193
method.Url.Params.Remove(kv.Key);
188194
method.Url.Params.Add(newName, kv.Value);
189195

190196
}
191-
192-
//method.Url.Params = method.Url.Params.Where(p => !overrides.SkipQueryStringParams.Contains(p.Key))
193-
// .ToDictionary(k => k.Key, v => v.Value);
194197
}
195198
// ReSharper disable once EmptyGeneralCatchClause
196199
catch

src/CodeGeneration/CodeGeneration.LowLevelClient/CodeGeneration.LowLevelClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<DefineConstants>TRACE</DefineConstants>
3333
<ErrorReport>prompt</ErrorReport>
3434
<WarningLevel>4</WarningLevel>
35+
<NoWarn>1591,1572,1571,1573,1587,1570</NoWarn>
3536
</PropertyGroup>
3637
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug - Generator|AnyCPU'">
3738
<DebugSymbols>true</DebugSymbols>

src/CodeGeneration/CodeGeneration.LowLevelClient/Overrides/Descriptors/UpdateDescriptorOverrides.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ public IEnumerable<string> SkipQueryStringParams
1616
}
1717
public IDictionary<string, string> RenameQueryStringParams { get { return null; } }
1818
}
19+
1920
}

src/CodeGeneration/CodeGeneration.LowLevelClient/Views/RawDispatch.Generated.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using System.Text;
99
using System.Threading.Tasks;
1010
using Elasticsearch.Net;
1111

12-
///Generated File Please Do Not Edit Manually
12+
//Generated File Please Do Not Edit Manually
1313
@{ RestApiSpec model = Model; }
1414

1515
namespace Nest

src/CodeGeneration/CodeGeneration.LowLevelClient/Views/RequestParameters.Generated.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ using System.Linq;
88
using System.Text;
99
using System.Linq.Expressions;
1010

11-
///This file contains all the typed querystring parameters that are generated of the client spec.
12-
///This file is automatically generated from https://github.com/elasticsearch/elasticsearch-rest-api-spec
13-
///Generated of commit @Model.Commit
11+
//This file contains all the typed querystring parameters that are generated of the client spec.
12+
//This file is automatically generated from https://github.com/elasticsearch/elasticsearch-rest-api-spec
13+
//Generated of commit @Model.Commit
1414

1515
namespace Elasticsearch.Net
1616
{

src/CodeGeneration/CodeGeneration.LowLevelClient/Views/_Descriptors.Generated.cshtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ using System.Linq;
99
using System.Text;
1010
using System.Linq.Expressions;
1111
using Elasticsearch.Net;
12-
///This file lays the base for all the descriptors based on the query string parameters in the spec for IElasticClient.
13-
///This file is automatically generated from https://github.com/elasticsearch/elasticsearch-rest-api-spec
14-
///Generated of commit @Model.Commit
12+
13+
//This file lays the base for all the descriptors based on the query string parameters in the spec for IElasticClient.
14+
//This file is automatically generated from https://github.com/elasticsearch/elasticsearch-rest-api-spec
15+
//Generated of commit @Model.Commit
1516

1617
namespace Nest
1718
{

src/CodeGeneration/CodeGeneration.LowLevelClient/Views/_Requests.Generated.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ using System.Text;
1111
using System.Linq.Expressions;
1212
using Elasticsearch.Net;
1313

14-
///This file contains all the typed querystring parameters that are generated of the client spec.
15-
///This file is automatically generated from https://github.com/elasticsearch/elasticsearch-rest-api-spec
16-
///Generated of commit @Model.Commit
14+
//This file contains all the typed querystring parameters that are generated of the client spec.
15+
//This file is automatically generated from https://github.com/elasticsearch/elasticsearch-rest-api-spec
16+
//Generated of commit @Model.Commit
1717

1818
namespace Nest
1919
{

src/CodeGeneration/CodeGeneration.YamlTestsRunner/CodeGeneration.YamlTestsRunner.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<DefineConstants>TRACE</DefineConstants>
3131
<ErrorReport>prompt</ErrorReport>
3232
<WarningLevel>4</WarningLevel>
33+
<NoWarn>1591,1572,1571,1573,1587,1570</NoWarn>
3334
</PropertyGroup>
3435
<ItemGroup>
3536
<Reference Include="CsQuery">

src/Connections/Elasticsearch.Net.Connection.HttpClient/Elasticsearch.Net.Connection.HttpClient.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<ErrorReport>prompt</ErrorReport>
3232
<WarningLevel>4</WarningLevel>
3333
<Prefer32Bit>false</Prefer32Bit>
34+
<NoWarn>1591,1572,1571,1573,1587,1570</NoWarn>
3435
</PropertyGroup>
3536
<ItemGroup>
3637
<Reference Include="System" />

src/Connections/Elasticsearch.Net.Connection.Thrift/Elasticsearch.Net.Connection.Thrift.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
5353
<WarningLevel>4</WarningLevel>
5454
<DocumentationFile>bin\Release\Elasticsearch.Net.Connection.Thrift.XML</DocumentationFile>
55+
<NoWarn>1591,1572,1571,1573,1587,1570</NoWarn>
5556
</PropertyGroup>
5657
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug - Generator|AnyCPU'">
5758
<DebugSymbols>true</DebugSymbols>
@@ -151,4 +152,4 @@
151152
<Target Name="AfterBuild">
152153
</Target>
153154
-->
154-
</Project>
155+
</Project>

0 commit comments

Comments
 (0)