Skip to content

Commit 54e1bf6

Browse files
committed
remove IConnectionSettings interface unused so should break exisiting code that uses it
1 parent c64c4f3 commit 54e1bf6

File tree

5 files changed

+65
-60
lines changed

5 files changed

+65
-60
lines changed

build/build.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let nugetPack = fun name ->
6969
CreateDir nugetOutDir
7070

7171
let dir = sprintf "%s/%s/" buildDir name
72-
let version = "1.0.0-alpha1"
72+
let version = "1.0.0-alpha4"
7373
NuGetPack (fun p ->
7474
{p with
7575
Version = version

src/Nest/ConvenienceExtensions/SerializerExtensions.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
using System.IO;
44
using System.Linq;
55
using System.Text;
6+
using Elasticsearch.Net.Serialization;
67

7-
namespace Nest
8+
namespace Nest.SerializationExtensions
89
{
910
public static class SerializerExtensions
1011
{
@@ -16,10 +17,11 @@ public static class SerializerExtensions
1617
/// <typeparam name="T">The type to deserialize to</typeparam>
1718
/// <param name="serializer"></param>
1819
/// <param name="data">The string representation of the data to be deserialized</param>
19-
public static T Deserialize<T>(this INestSerializer serializer, string data)
20+
public static T Deserialize<T>(this IElasticClient client, string data)
2021
{
2122
using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(data)))
22-
return serializer.Deserialize<T>(null, ms, null);
23+
return client.Serializer.Deserialize<T>(null, ms, null);
2324
}
25+
2426
}
2527
}

src/Nest/Domain/Connection/IConnectionSettings.cs

Lines changed: 58 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,71 +9,74 @@
99

1010
namespace Nest
1111
{
12-
/// <summary>
13-
/// Control how NEST's behaviour.
14-
/// </summary>
15-
public interface IConnectionSettings : IConnectionSettings<IConnectionSettings>, IConnectionConfigurationValues
16-
{
12+
//TODO Remove
13+
14+
15+
///// <summary>
16+
///// Control how NEST's behaviour.
17+
///// </summary>
18+
//public interface IConnectionSettings : IConnectionSettings<IConnectionSettings>, IConnectionConfigurationValues
19+
//{
1720

18-
}
19-
public interface IConnectionSettings<out T> : IConnectionConfiguration<T> where T : IConnectionSettings<T>
20-
{
21+
//}
22+
//public interface IConnectionSettings<out T> : IConnectionConfiguration<T> where T : IConnectionSettings<T>
23+
//{
2124

22-
/// <summary>
23-
/// This calls SetDefaultTypenameInferrer with an implementation that will pluralize type names.
24-
/// This used to be the default prior to Nest 1.0
25-
/// </summary>
26-
/// <returns></returns>
27-
T PluralizeTypeNames();
25+
// /// <summary>
26+
// /// This calls SetDefaultTypenameInferrer with an implementation that will pluralize type names.
27+
// /// This used to be the default prior to Nest 1.0
28+
// /// </summary>
29+
// /// <returns></returns>
30+
// T PluralizeTypeNames();
2831

29-
/// <summary>
30-
/// Allows you to update internal the json.net serializer settings to your liking
31-
/// </summary>
32-
/// <param name="modifier"></param>
33-
/// <returns></returns>
34-
T SetJsonSerializerSettingsModifier(Action<JsonSerializerSettings> modifier);
32+
// /// <summary>
33+
// /// Allows you to update internal the json.net serializer settings to your liking
34+
// /// </summary>
35+
// /// <param name="modifier"></param>
36+
// /// <returns></returns>
37+
// T SetJsonSerializerSettingsModifier(Action<JsonSerializerSettings> modifier);
3538

36-
/// <summary>
37-
/// Add a custom JsonConverter to the build in json serialization by passing in a predicate for a type.
38-
/// This is faster then adding them using AddJsonConverters() because this way they will be part of the cached
39-
/// Json.net contract for a type.
40-
/// </summary>
41-
T AddContractJsonConverters(params Func<Type, JsonConverter>[] contractSelectors);
39+
// /// <summary>
40+
// /// Add a custom JsonConverter to the build in json serialization by passing in a predicate for a type.
41+
// /// This is faster then adding them using AddJsonConverters() because this way they will be part of the cached
42+
// /// Json.net contract for a type.
43+
// /// </summary>
44+
// T AddContractJsonConverters(params Func<Type, JsonConverter>[] contractSelectors);
4245

4346

44-
/// <summary>
45-
/// Index to default to when no index is specified.
46-
/// </summary>
47-
/// <param name="defaultIndex">When null/empty/not set might throw NRE later on
48-
/// when not specifying index explicitly while indexing.
49-
/// </param>
50-
/// <returns></returns>
51-
T SetDefaultIndex(string defaultIndex);
47+
// /// <summary>
48+
// /// Index to default to when no index is specified.
49+
// /// </summary>
50+
// /// <param name="defaultIndex">When null/empty/not set might throw NRE later on
51+
// /// when not specifying index explicitly while indexing.
52+
// /// </param>
53+
// /// <returns></returns>
54+
// T SetDefaultIndex(string defaultIndex);
5255

5356

54-
/// <summary>
55-
/// By default NEST camelCases property names (EmailAddress => emailAddress) that do not have an explicit propertyname
56-
/// either via an ElasticProperty attribute or because they are part of Dictionary where the keys should be treated verbatim.
57-
/// <pre>
58-
/// Here you can register a function that transforms propertynames (default casing, pre- or suffixing)
59-
/// </pre>
60-
/// </summary>
61-
T SetDefaultPropertyNameInferrer(Func<string, string> propertyNameSelector);
57+
// /// <summary>
58+
// /// By default NEST camelCases property names (EmailAddress => emailAddress) that do not have an explicit propertyname
59+
// /// either via an ElasticProperty attribute or because they are part of Dictionary where the keys should be treated verbatim.
60+
// /// <pre>
61+
// /// Here you can register a function that transforms propertynames (default casing, pre- or suffixing)
62+
// /// </pre>
63+
// /// </summary>
64+
// T SetDefaultPropertyNameInferrer(Func<string, string> propertyNameSelector);
6265

63-
/// <summary>
64-
/// Allows you to override how type names should be reprented, the default will call .ToLowerInvariant() on the type's name.
65-
/// </summary>
66-
T SetDefaultTypeNameInferrer(Func<Type, string> defaultTypeNameInferrer);
66+
// /// <summary>
67+
// /// Allows you to override how type names should be reprented, the default will call .ToLowerInvariant() on the type's name.
68+
// /// </summary>
69+
// T SetDefaultTypeNameInferrer(Func<Type, string> defaultTypeNameInferrer);
6770

6871

69-
/// <summary>
70-
/// Map types to a index names. Takes precedence over SetDefaultIndex().
71-
/// </summary>
72-
T MapDefaultTypeIndices(Action<FluentDictionary<Type, string>> mappingSelector);
72+
// /// <summary>
73+
// /// Map types to a index names. Takes precedence over SetDefaultIndex().
74+
// /// </summary>
75+
// T MapDefaultTypeIndices(Action<FluentDictionary<Type, string>> mappingSelector);
7376

74-
/// <summary>
75-
/// Allows you to override typenames, takes priority over the global SetDefaultTypeNameInferrer()
76-
/// </summary>
77-
T MapDefaultTypeNames(Action<FluentDictionary<Type, string>> mappingSelector);
78-
}
77+
// /// <summary>
78+
// /// Allows you to override typenames, takes priority over the global SetDefaultTypeNameInferrer()
79+
// /// </summary>
80+
// T MapDefaultTypeNames(Action<FluentDictionary<Type, string>> mappingSelector);
81+
//}
7982
}

src/Nest/ElasticClient.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public ElasticClient(
4040
IConnection connection = null,
4141
INestSerializer serializer = null)
4242
{
43-
4443
this._connectionSettings = settings ?? new ConnectionSettings();
4544
this.Connection = connection ?? new HttpConnection(settings);
4645

src/Nest/Nest.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
<Compile Include="ConvenienceExtensions\GetMappingExtensions.cs" />
9999
<Compile Include="ConvenienceExtensions\OpenCloseIndexExtensions.cs" />
100100
<Compile Include="ConvenienceExtensions\ScrollExtensions.cs" />
101+
<Compile Include="ConvenienceExtensions\SerializerExtensions.cs" />
101102
<Compile Include="ConvenienceExtensions\SourceExtensions.cs" />
102103
<Compile Include="ConvenienceExtensions\SourceManyExtensions.cs" />
103104
<Compile Include="Domain\Aggregations\AggregationsHelper.cs" />

0 commit comments

Comments
 (0)