Skip to content

Commit e276839

Browse files
committed
Rename package and namespace
1 parent f149342 commit e276839

File tree

465 files changed

+11629
-12136
lines changed

Some content is hidden

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

465 files changed

+11629
-12136
lines changed

Elasticsearch.sln

+16-16
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ VisualStudioVersion = 17.0.31612.314
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D455EC79-E1E0-4509-B297-0DA3AED8DFF7}"
77
EndProject
8-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Nest", "src\Nest\Nest.csproj", "{39149B87-983F-464B-9E79-61FB4558A84F}"
9-
EndProject
108
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playground", "src\Playground\Playground.csproj", "{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}"
119
EndProject
1210
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Transport", "..\elastic-transport-net\src\Elastic.Transport\Elastic.Transport.csproj", "{14E44695-6737-49B2-8AD5-7AA77E4205D2}"
@@ -27,13 +25,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "benchmarks\Be
2725
EndProject
2826
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PlaygroundV7x", "src\PlaygroundV7x\PlaygroundV7x.csproj", "{7141AB85-10C5-42AE-8FC7-B14A4216A89F}"
2927
EndProject
30-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiling", "benchmarks\Profiling\Profiling.csproj", "{5222D7CD-3663-49ED-98EA-4B5ECDF705BF}"
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Profiling", "benchmarks\Profiling\Profiling.csproj", "{5222D7CD-3663-49ED-98EA-4B5ECDF705BF}"
3129
EndProject
3230
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D9FFF81B-26F3-4A26-9605-E3D22382E9A5}"
3331
ProjectSection(SolutionItems) = preProject
3432
global.json = global.json
3533
EndProjectSection
3634
EndProject
35+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elastic.Clients.Elasticsearch", "src\Elastic.Clients.Elasticsearch\Elastic.Clients.Elasticsearch.csproj", "{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}"
36+
EndProject
3737
Global
3838
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3939
Debug|Any CPU = Debug|Any CPU
@@ -44,18 +44,6 @@ Global
4444
Release|x86 = Release|x86
4545
EndGlobalSection
4646
GlobalSection(ProjectConfigurationPlatforms) = postSolution
47-
{39149B87-983F-464B-9E79-61FB4558A84F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48-
{39149B87-983F-464B-9E79-61FB4558A84F}.Debug|Any CPU.Build.0 = Debug|Any CPU
49-
{39149B87-983F-464B-9E79-61FB4558A84F}.Debug|x64.ActiveCfg = Debug|Any CPU
50-
{39149B87-983F-464B-9E79-61FB4558A84F}.Debug|x64.Build.0 = Debug|Any CPU
51-
{39149B87-983F-464B-9E79-61FB4558A84F}.Debug|x86.ActiveCfg = Debug|Any CPU
52-
{39149B87-983F-464B-9E79-61FB4558A84F}.Debug|x86.Build.0 = Debug|Any CPU
53-
{39149B87-983F-464B-9E79-61FB4558A84F}.Release|Any CPU.ActiveCfg = Release|Any CPU
54-
{39149B87-983F-464B-9E79-61FB4558A84F}.Release|Any CPU.Build.0 = Release|Any CPU
55-
{39149B87-983F-464B-9E79-61FB4558A84F}.Release|x64.ActiveCfg = Release|Any CPU
56-
{39149B87-983F-464B-9E79-61FB4558A84F}.Release|x64.Build.0 = Release|Any CPU
57-
{39149B87-983F-464B-9E79-61FB4558A84F}.Release|x86.ActiveCfg = Release|Any CPU
58-
{39149B87-983F-464B-9E79-61FB4558A84F}.Release|x86.Build.0 = Release|Any CPU
5947
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6048
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
6149
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -164,12 +152,23 @@ Global
164152
{5222D7CD-3663-49ED-98EA-4B5ECDF705BF}.Release|x64.Build.0 = Release|Any CPU
165153
{5222D7CD-3663-49ED-98EA-4B5ECDF705BF}.Release|x86.ActiveCfg = Release|Any CPU
166154
{5222D7CD-3663-49ED-98EA-4B5ECDF705BF}.Release|x86.Build.0 = Release|Any CPU
155+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
156+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Debug|Any CPU.Build.0 = Debug|Any CPU
157+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Debug|x64.ActiveCfg = Debug|Any CPU
158+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Debug|x64.Build.0 = Debug|Any CPU
159+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Debug|x86.ActiveCfg = Debug|Any CPU
160+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Debug|x86.Build.0 = Debug|Any CPU
161+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|Any CPU.ActiveCfg = Release|Any CPU
162+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|Any CPU.Build.0 = Release|Any CPU
163+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x64.ActiveCfg = Release|Any CPU
164+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x64.Build.0 = Release|Any CPU
165+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x86.ActiveCfg = Release|Any CPU
166+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D}.Release|x86.Build.0 = Release|Any CPU
167167
EndGlobalSection
168168
GlobalSection(SolutionProperties) = preSolution
169169
HideSolutionNode = FALSE
170170
EndGlobalSection
171171
GlobalSection(NestedProjects) = preSolution
172-
{39149B87-983F-464B-9E79-61FB4558A84F} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
173172
{8F2EA767-8746-4816-B6EE-342BCB8F1AAB} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
174173
{14E44695-6737-49B2-8AD5-7AA77E4205D2} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
175174
{BDF1ABC2-8C52-4864-B824-B1FA27630E8E} = {362B2776-4B29-46AB-B237-56776B5372B6}
@@ -179,6 +178,7 @@ Global
179178
{701DB05B-1F1B-485F-9EDF-0274EED4FF9F} = {B7B8819B-3197-4AB6-B61B-9E1BFD1EC302}
180179
{7141AB85-10C5-42AE-8FC7-B14A4216A89F} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
181180
{5222D7CD-3663-49ED-98EA-4B5ECDF705BF} = {B7B8819B-3197-4AB6-B61B-9E1BFD1EC302}
181+
{F8A7E60C-0C48-4D76-AF7F-7881DF5A263D} = {D455EC79-E1E0-4509-B297-0DA3AED8DFF7}
182182
EndGlobalSection
183183
GlobalSection(ExtensibilityGlobals) = postSolution
184184
SolutionGuid = {CE74F821-B001-4C69-A58D-CF81F8B0B632}

benchmarks/Benchmarks/Benchmarks.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<ProjectReference Include="..\..\src\Nest\Nest.csproj" />
14+
<ProjectReference Include="..\..\src\Elastic.Clients.Elasticsearch\Elastic.Clients.Elasticsearch.csproj" />
1515
</ItemGroup>
1616

1717
</Project>

benchmarks/Benchmarks/Program.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Linq;
44
using BenchmarkDotNet.Attributes;
55
using BenchmarkDotNet.Running;
6-
using Nest;
76

87
namespace Benchmarks;
98

benchmarks/Profiling/Profiling.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<ProjectReference Include="..\..\src\Nest\Nest.csproj" />
14+
<ProjectReference Include="..\..\src\Elastic.Clients.Elasticsearch\Elastic.Clients.Elasticsearch.csproj" />
1515
</ItemGroup>
1616

1717
</Project>

src/Nest/Api/Requests/Requests.NoNamespace.cs renamed to src/Elastic.Clients.Elasticsearch/Api/Requests/Requests.NoNamespace.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text.Json.Serialization;
55
using Elastic.Transport;
66

7-
namespace Nest
7+
namespace Elastic.Clients.Elasticsearch
88
{
99
public partial interface IIndexRequest<TDocument> : ICustomJsonWriter
1010
{

src/Nest/Client/ElasticClient.cs renamed to src/Elastic.Clients.Elasticsearch/Client/ElasticClient.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Threading.Tasks;
44
using Elastic.Transport;
55

6-
namespace Nest;
6+
namespace Elastic.Clients.Elasticsearch;
77

88
/// <inheritdoc />
99
public partial class ElasticClient : IElasticClient

src/Nest/Client/IElasticClient.cs renamed to src/Elastic.Clients.Elasticsearch/Client/IElasticClient.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using Elastic.Transport;
22

3-
namespace Nest
3+
namespace Elastic.Clients.Elasticsearch
44
{
55
/// <summary>
6-
/// ElasticClient is NEST's strongly typed client which exposes fully mapped Elasticsearch endpoints.
6+
/// ElasticClient is Elastic.Clients.Elasticsearch's strongly typed client which exposes fully mapped Elasticsearch endpoints.
77
/// </summary>
88
/// <remarks>
99
/// It is generally expected to be used as a singleton instance for the lifetime of the host application.

src/Nest/Client/NamespacedClientProxy.cs renamed to src/Elastic.Clients.Elasticsearch/Client/NamespacedClientProxy.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Threading.Tasks;
44
using Elastic.Transport;
55

6-
namespace Nest
6+
namespace Elastic.Clients.Elasticsearch
77
{
88
/// <summary>
99
/// </summary>

src/Nest/Common/ConnectionSettings/ClrPropertyMapping.cs renamed to src/Elastic.Clients.Elasticsearch/Common/ConnectionSettings/ClrPropertyMapping.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System;
66
using System.Linq.Expressions;
77

8-
namespace Nest
8+
namespace Elastic.Clients.Elasticsearch
99
{
1010
public abstract class ClrPropertyMappingBase<TDocument> : IClrPropertyMapping<TDocument>
1111
where TDocument : class

src/Nest/Common/ConnectionSettings/ClrTypeDefaults.cs renamed to src/Elastic.Clients.Elasticsearch/Common/ConnectionSettings/ClrTypeDefaults.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Collections.Generic;
77
using System.Linq.Expressions;
88

9-
namespace Nest
9+
namespace Elastic.Clients.Elasticsearch
1010
{
1111
public interface IClrTypeMapping
1212
{
@@ -39,7 +39,7 @@ public interface IClrTypeMapping
3939

4040
public interface IClrTypeMapping<TDocument> : IClrTypeMapping where TDocument : class
4141
{
42-
/// <summary> Set a default Id property on CLR type <typeparamref name="TDocument" /> that NEST will evaluate </summary>
42+
/// <summary> Set a default Id property on CLR type <typeparamref name="TDocument" /> that Elastic.Clients.Elasticsearch will evaluate </summary>
4343
Expression<Func<TDocument, object>> IdProperty { get; set; }
4444

4545
/// <summary>
@@ -141,12 +141,12 @@ public class ClrTypeMappingDescriptor<TDocument>
141141
public ClrTypeMappingDescriptor<TDocument> RelationName(string relationName) => Assign(relationName, (a, v) => a.RelationName = v);
142142

143143
/// <summary>
144-
/// Set a default Id property on CLR type <typeparamref name="TDocument" /> that NEST will evaluate
144+
/// Set a default Id property on CLR type <typeparamref name="TDocument" /> that Elastic.Clients.Elasticsearch will evaluate
145145
/// </summary>
146146
public ClrTypeMappingDescriptor<TDocument> IdProperty(Expression<Func<TDocument, object>> property) => Assign(property, (a, v) => a.IdProperty = v);
147147

148148
/// <summary>
149-
/// Set a default Id property on CLR type <typeparamref name="TDocument" /> that NEST will evaluate
149+
/// Set a default Id property on CLR type <typeparamref name="TDocument" /> that Elastic.Clients.Elasticsearch will evaluate
150150
/// </summary>
151151
public ClrTypeMappingDescriptor<TDocument> IdProperty(string property) => Assign(property, (a, v) => a.IdPropertyName = v);
152152

src/Nest/Common/ConnectionSettings/ElasticsearchClientSettings.cs renamed to src/Elastic.Clients.Elasticsearch/Common/ConnectionSettings/ElasticsearchClientSettings.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#endif
1313

14-
namespace Nest
14+
namespace Elastic.Clients.Elasticsearch
1515
{
1616
/// <inheritdoc cref="IElasticsearchClientSettings" />
1717
public class ElasticsearchClientSettings : ElasticsearchClientSettingsBase<ElasticsearchClientSettings>
@@ -24,7 +24,7 @@ public class ElasticsearchClientSettings : ElasticsearchClientSettingsBase<Elast
2424
public delegate ITransportSerializer SourceSerializerFactory(ITransportSerializer builtIn,
2525
IElasticsearchClientSettings values);
2626

27-
/// <summary> The default user agent for Nest </summary>
27+
/// <summary> The default user agent for Elastic.Clients.Elasticsearch </summary>
2828
public static readonly UserAgent DefaultUserAgent =
2929
Elastic.Transport.UserAgent.Create("elasticsearch-net", typeof(IElasticsearchClientSettings));
3030

@@ -105,7 +105,7 @@ protected ElasticsearchClientSettingsBase(
105105
IConnectionPool connectionPool,
106106
IConnection connection,
107107
ElasticsearchClientSettings.SourceSerializerFactory? sourceSerializerFactory)
108-
: base(connectionPool, connection, null, NestElasticsearchProductRegistration.DefaultForNest)
108+
: base(connectionPool, connection, null, Elastic.Clients.ElasticsearchElasticsearchProductRegistration.DefaultForElastic.Clients.Elasticsearch)
109109
{
110110
var defaultSerializer = new DefaultHighLevelSerializer(this);
111111
var sourceSerializer = sourceSerializerFactory?.Invoke(defaultSerializer, this) ?? defaultSerializer;
@@ -155,7 +155,7 @@ public TConnectionSettings DefaultIndex(string defaultIndex) =>
155155
/// <summary>
156156
/// Specifies how field names are inferred from CLR property names.
157157
/// <para></para>
158-
/// By default, NEST camel cases property names.
158+
/// By default, Elastic.Clients.Elasticsearch camel cases property names.
159159
/// </summary>
160160
/// <example>
161161
/// CLR property EmailAddress will be inferred as "emailAddress" Elasticsearch document field name
@@ -166,7 +166,7 @@ public TConnectionSettings DefaultFieldNameInferrer(Func<string, string> fieldNa
166166
/// <summary>
167167
/// Disables automatic Id inference for given CLR types.
168168
/// <para></para>
169-
/// NEST by default will use the value of a property named Id on a CLR type as the _id to send to Elasticsearch. Adding
169+
/// Elastic.Clients.Elasticsearch by default will use the value of a property named Id on a CLR type as the _id to send to Elasticsearch. Adding
170170
/// a type
171171
/// will disable this behaviour for that CLR type. If Id inference should be disabled for all CLR types, use
172172
/// <see cref="DefaultDisableIdInference" />

src/Nest/Common/ConnectionSettings/IElasticsearchClientSettings.cs renamed to src/Elastic.Clients.Elasticsearch/Common/ConnectionSettings/IElasticsearchClientSettings.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
using System.Collections.Generic;
33
using Elastic.Transport;
44

5-
namespace Nest
5+
namespace Elastic.Clients.Elasticsearch
66
{
77
/// <summary>
8-
/// Provides the connection settings for NEST's high level <see cref="ElasticClient" />
8+
/// Provides the connection settings for Elastic.Clients.Elasticsearch's high level <see cref="ElasticClient" />
99
/// </summary>
1010
public interface IElasticsearchClientSettings : ITransportConfiguration
1111
{
1212
/// <summary>
1313
/// Specifies how field names are inferred from CLR property names.
1414
/// <para></para>
15-
/// By default, NEST camel cases property names.
15+
/// By default, Elastic.Clients.Elasticsearch camel cases property names.
1616
/// </summary>
1717
/// <example>
1818
/// CLR property EmailAddress will be inferred as "emailAddress" Elasticsearch document field name
@@ -63,7 +63,7 @@ public interface IElasticsearchClientSettings : ITransportConfiguration
6363
/// <summary>
6464
/// Disables automatic Id inference for given CLR types.
6565
/// <para></para>
66-
/// NEST by default will use the value of a property named Id on a CLR type as the _id to send to Elasticsearch. Adding
66+
/// Elastic.Clients.Elasticsearch by default will use the value of a property named Id on a CLR type as the _id to send to Elasticsearch. Adding
6767
/// a type
6868
/// will disable this behaviour for that CLR type. If Id inference should be disabled for all CLR types, use
6969
/// <see cref="DefaultDisableIdInference" />
@@ -73,7 +73,7 @@ public interface IElasticsearchClientSettings : ITransportConfiguration
7373
/// <summary>
7474
/// Disables automatic Id inference for all CLR types.
7575
/// <para></para>
76-
/// NEST by default will use the value of a property named Id on a CLR type as the _id to send to Elasticsearch.
76+
/// Elastic.Clients.Elasticsearch by default will use the value of a property named Id on a CLR type as the _id to send to Elasticsearch.
7777
/// Setting this to <c>true</c>
7878
/// will disable this behaviour for all CLR types and cannot be overridden. If Id inference should be disabled only for
7979
/// specific types, use

src/Nest/Common/ConnectionSettings/MemberInfoResolver.cs renamed to src/Elastic.Clients.Elasticsearch/Common/ConnectionSettings/MemberInfoResolver.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Linq.Expressions;
77
using System.Reflection;
88

9-
namespace Nest
9+
namespace Elastic.Clients.Elasticsearch
1010
{
1111
/// <summary>
1212
/// Resolves member infos in an expression, instance may NOT be shared.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information
4+
5+
using System;
6+
7+
namespace Elastic.Clients.Elasticsearch
8+
{
9+
internal static class ExceptionExtensions
10+
{
11+
internal static T ThrowWhen<T>(this T @object, Func<T, bool> predicate, string exceptionMessage)
12+
{
13+
var x = predicate?.Invoke(@object);
14+
if (x.GetValueOrDefault(false))
15+
throw new ArgumentException(exceptionMessage);
16+
17+
return @object;
18+
}
19+
}
20+
}

src/Nest/Common/Extensions/ExpressionExtensions.cs renamed to src/Elastic.Clients.Elasticsearch/Common/Extensions/ExpressionExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Linq;
77
using System.Linq.Expressions;
88

9-
namespace Nest
9+
namespace Elastic.Clients.Elasticsearch
1010
{
1111
public static class ExpressionExtensions
1212
{
@@ -53,7 +53,7 @@ internal static object ComparisonValueFromExpression(this Expression expression,
5353
// type Doc = { Message: string; State: string }
5454
// let field (f:Expr<'a -> 'b>) =
5555
// Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.QuotationToExpression f
56-
// |> Nest.Field.op_Implicit
56+
// |> Elastic.Clients.Elasticsearch.Field.op_Implicit
5757
//
5858
// let fieldExpression = field <@ fun (d: Doc) -> d.Message @>
5959
//

0 commit comments

Comments
 (0)