Skip to content

Commit 92d42a4

Browse files
committed
NEST is now also CLSCompliant, fixed several _Property style classes still around
1 parent 213eb1a commit 92d42a4

File tree

50 files changed

+268
-251
lines changed

Some content is hidden

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

50 files changed

+268
-251
lines changed
Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
//------------------------------------------------------------------------------
2-
// <auto-generated>
3-
// This code was generated by a tool.
4-
// Runtime Version:4.0.30319.17626
5-
//
6-
// Changes to this file may cause incorrect behavior and will be lost if
7-
// the code is regenerated.
8-
// </auto-generated>
9-
//------------------------------------------------------------------------------
10-
11-
using System;
12-
using System.Reflection;
13-
using System.Resources;
14-
using System.Runtime.CompilerServices;
15-
using System.Runtime.InteropServices;
16-
1+
using System;
172

183
[assembly: CLSCompliant(true)]
194

src/Nest/DSL/Aggregations/SignificantTermsAggregationDescriptor.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,106 +11,106 @@ namespace Nest
1111
public interface ISignificantTermsAggregator : IBucketAggregator
1212
{
1313
[JsonProperty("field")]
14-
PropertyPathMarker _Field { get; set; }
14+
PropertyPathMarker Field { get; set; }
1515

1616
[JsonProperty("size")]
17-
int? _Size { get; set; }
17+
int? Size { get; set; }
1818

1919
[JsonProperty("shard_size")]
20-
int? _ShardSize { get; set; }
20+
int? ShardSize { get; set; }
2121

2222
[JsonProperty("min_doc_count")]
23-
int? _MinimumDocumentCount { get; set; }
23+
int? MinimumDocumentCount { get; set; }
2424

2525
[JsonProperty("execution_hit")]
26-
TermsAggregationExecutionHint? _ExecutionHint { get; set; }
26+
TermsAggregationExecutionHint? ExecutionHint { get; set; }
2727

2828
[JsonProperty("include")]
29-
IDictionary<string, string> _Include { get; set; }
29+
IDictionary<string, string> Include { get; set; }
3030

3131
[JsonProperty("exclude")]
32-
IDictionary<string, string> _Exclude { get; set; }
32+
IDictionary<string, string> Exclude { get; set; }
3333
}
3434

3535
public class SignificantTermsAggregator : BucketAggregator, ISignificantTermsAggregator
3636
{
37-
public PropertyPathMarker _Field { get; set; }
38-
public int? _Size { get; set; }
39-
public int? _ShardSize { get; set; }
40-
public int? _MinimumDocumentCount { get; set; }
41-
public TermsAggregationExecutionHint? _ExecutionHint { get; set; }
42-
public IDictionary<string, string> _Include { get; set; }
43-
public IDictionary<string, string> _Exclude { get; set; }
37+
public PropertyPathMarker Field { get; set; }
38+
public int? Size { get; set; }
39+
public int? ShardSize { get; set; }
40+
public int? MinimumDocumentCount { get; set; }
41+
public TermsAggregationExecutionHint? ExecutionHint { get; set; }
42+
public IDictionary<string, string> Include { get; set; }
43+
public IDictionary<string, string> Exclude { get; set; }
4444
}
4545

4646
public class SignificantTermsAggregationDescriptor<T> : BucketAggregationBaseDescriptor<SignificantTermsAggregationDescriptor<T>, T>, ISignificantTermsAggregator where T : class
4747
{
4848
private ISignificantTermsAggregator Self { get { return this; } }
4949

50-
PropertyPathMarker ISignificantTermsAggregator._Field { get; set; }
50+
PropertyPathMarker ISignificantTermsAggregator.Field { get; set; }
5151

52-
int? ISignificantTermsAggregator._Size { get; set; }
52+
int? ISignificantTermsAggregator.Size { get; set; }
5353

54-
int? ISignificantTermsAggregator._ShardSize { get; set; }
54+
int? ISignificantTermsAggregator.ShardSize { get; set; }
5555

56-
int? ISignificantTermsAggregator._MinimumDocumentCount { get; set; }
56+
int? ISignificantTermsAggregator.MinimumDocumentCount { get; set; }
5757

58-
TermsAggregationExecutionHint? ISignificantTermsAggregator._ExecutionHint { get; set; }
58+
TermsAggregationExecutionHint? ISignificantTermsAggregator.ExecutionHint { get; set; }
5959

60-
IDictionary<string, string> ISignificantTermsAggregator._Include { get; set; }
60+
IDictionary<string, string> ISignificantTermsAggregator.Include { get; set; }
6161

62-
IDictionary<string, string> ISignificantTermsAggregator._Exclude { get; set; }
62+
IDictionary<string, string> ISignificantTermsAggregator.Exclude { get; set; }
6363

6464
public SignificantTermsAggregationDescriptor<T> Field(string field)
6565
{
66-
Self._Field = field;
66+
Self.Field = field;
6767
return this;
6868
}
6969

7070
public SignificantTermsAggregationDescriptor<T> Field(Expression<Func<T, object>> field)
7171
{
72-
Self._Field = field;
72+
Self.Field = field;
7373
return this;
7474
}
7575

7676

7777
public SignificantTermsAggregationDescriptor<T> Size(int size)
7878
{
79-
Self._Size = size;
79+
Self.Size = size;
8080
return this;
8181
}
8282

8383
public SignificantTermsAggregationDescriptor<T> ShardSize(int shardSize)
8484
{
85-
Self._ShardSize = shardSize;
85+
Self.ShardSize = shardSize;
8686
return this;
8787
}
8888

8989
public SignificantTermsAggregationDescriptor<T> MinimumDocumentCount(int minimumDocumentCount)
9090
{
91-
Self._MinimumDocumentCount = minimumDocumentCount;
91+
Self.MinimumDocumentCount = minimumDocumentCount;
9292
return this;
9393
}
9494

9595
public SignificantTermsAggregationDescriptor<T> ExecutionHint(TermsAggregationExecutionHint executionHint)
9696
{
97-
Self._ExecutionHint = executionHint;
97+
Self.ExecutionHint = executionHint;
9898
return this;
9999
}
100100

101101
public SignificantTermsAggregationDescriptor<T> Include(string includePattern, string regexFlags = null)
102102
{
103-
Self._Include = new Dictionary<string, string> { {"pattern", includePattern}};
103+
Self.Include = new Dictionary<string, string> { {"pattern", includePattern}};
104104
if (!regexFlags.IsNullOrEmpty())
105-
Self._Include.Add("pattern", regexFlags);
105+
Self.Include.Add("pattern", regexFlags);
106106
return this;
107107
}
108108

109109
public SignificantTermsAggregationDescriptor<T> Exclude(string excludePattern, string regexFlags = null)
110110
{
111-
Self._Exclude = new Dictionary<string, string> { {"pattern", excludePattern}};
111+
Self.Exclude = new Dictionary<string, string> { {"pattern", excludePattern}};
112112
if (!regexFlags.IsNullOrEmpty())
113-
Self._Exclude.Add("pattern", regexFlags);
113+
Self.Exclude.Add("pattern", regexFlags);
114114
return this;
115115
}
116116
}

src/Nest/DSL/Bulk/BulkCreateDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public class BulkCreateDescriptor<T> : BulkOperationDescriptorBase, IBulkCreateO
3939
{
4040
private IBulkCreateOperation<T> Self { get { return this; } }
4141

42-
protected override string _Operation { get { return "create"; } }
43-
protected override Type _ClrType { get { return typeof(T); } }
44-
protected override object _GetBody()
42+
protected override string BulkOperationType { get { return "create"; } }
43+
protected override Type BulkOperationClrType { get { return typeof(T); } }
44+
protected override object GetBulkOperationBody()
4545
{
4646
return Self.Document;
4747
}

src/Nest/DSL/Bulk/BulkDeleteDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ public class BulkDeleteDescriptor<T> : BulkOperationDescriptorBase, IBulkDeleteO
4242
{
4343
private IBulkDeleteOperation<T> Self { get { return this; } }
4444

45-
protected override string _Operation { get { return "delete"; } }
46-
protected override Type _ClrType { get { return typeof(T); } }
45+
protected override string BulkOperationType { get { return "delete"; } }
46+
protected override Type BulkOperationClrType { get { return typeof(T); } }
4747

4848
T IBulkDeleteOperation<T>.Document { get; set; }
4949

50-
protected override object _GetBody()
50+
protected override object GetBulkOperationBody()
5151
{
5252
return null;
5353
}

src/Nest/DSL/Bulk/BulkIndexDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ public class BulkIndexDescriptor<T> : BulkOperationDescriptorBase, IIndexOperati
4444
{
4545
private IIndexOperation<T> Self { get { return this; } }
4646

47-
protected override string _Operation { get { return "index"; } }
48-
protected override Type _ClrType { get { return typeof(T); } }
47+
protected override string BulkOperationType { get { return "index"; } }
48+
protected override Type BulkOperationClrType { get { return typeof(T); } }
4949

5050
string IIndexOperation<T>.Percolate { get; set; }
5151
T IIndexOperation<T>.Document { get; set; }
5252

53-
protected override object _GetBody()
53+
protected override object GetBulkOperationBody()
5454
{
5555
return Self.Document;
5656
}

src/Nest/DSL/Bulk/BulkUpdateDescriptor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public class BulkUpdateDescriptor<TDocument, TPartialUpdate>
7676
{
7777
private IBulkUpdateOperation<TDocument, TPartialUpdate> Self { get { return this; } }
7878

79-
protected override string _Operation { get { return "update"; } }
80-
protected override Type _ClrType { get { return typeof(TDocument); } }
79+
protected override string BulkOperationType { get { return "update"; } }
80+
protected override Type BulkOperationClrType { get { return typeof(TDocument); } }
8181

8282
TDocument IBulkUpdateOperation<TDocument, TPartialUpdate>.Document { get; set; }
8383
TDocument IBulkUpdateOperation<TDocument, TPartialUpdate>.Upsert { get; set; }
@@ -87,7 +87,7 @@ public class BulkUpdateDescriptor<TDocument, TPartialUpdate>
8787
string IBulkUpdateOperation<TDocument, TPartialUpdate>.Script { get; set; }
8888
Dictionary<string, object> IBulkUpdateOperation<TDocument, TPartialUpdate>.Params { get; set; }
8989

90-
protected override object _GetBody()
90+
protected override object GetBulkOperationBody()
9191
{
9292
return new BulkUpdateBody<TDocument, TPartialUpdate>
9393
{

src/Nest/DSL/Common/BasePathRequest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ public abstract class BasePathRequest<TParameters> : BaseRequest<TParameters>
88
where TParameters : IRequestParameters, new()
99
{
1010

11-
[JsonIgnore]
12-
public IRequestConfiguration RequestConfiguration
13-
{
14-
get { return base._requestConfiguration; }
15-
set { base._requestConfiguration = value; }
16-
}
11+
//[JsonIgnore]
12+
//public IRequestConfiguration RequestConfiguration
13+
//{
14+
// get { return base._requestConfiguration; }
15+
// set { base._requestConfiguration = value; }
16+
//}
1717
}
1818
}

src/Nest/DSL/Common/BaseRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ IRequestConfiguration IRequest<TParameters>.RequestConfiguration
1717
set { _requestConfiguration = value; }
1818
}
1919

20-
protected TParameters _requestParameters = new TParameters();
21-
protected IRequestConfiguration _requestConfiguration;
20+
private TParameters _requestParameters = new TParameters();
21+
private IRequestConfiguration _requestConfiguration;
2222

2323
[JsonIgnore]
2424
TParameters IRequest<TParameters>.RequestParameters

src/Nest/DSL/Filter/FilterContainer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ public class FilterContainer : IFilterContainer, ICustomJson
1010
{
1111
private static readonly IEnumerable<FilterContainer> Empty = Enumerable.Empty<FilterContainer>();
1212

13-
string IFilterContainer._FilterName { get; set; }
13+
string IFilterContainer.FilterName { get; set; }
1414

15-
string IFilterContainer._CacheKey { get; set; }
15+
string IFilterContainer.CacheKey { get; set; }
1616

17-
bool? IFilterContainer._Cache { get; set; }
17+
bool? IFilterContainer.Cache { get; set; }
1818

1919
string IFilterContainer.RawFilter { get; set; }
2020

src/Nest/DSL/Filter/FilterDescriptor.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ public class FilterDescriptor<T> : FilterContainer
1414

1515
public FilterDescriptor<T> Name(string name)
1616
{
17-
Self._FilterName = name;
17+
Self.FilterName = name;
1818
return this;
1919
}
2020
public FilterDescriptor<T> CacheKey(string cacheKey)
2121
{
22-
Self._CacheKey = cacheKey;
22+
Self.CacheKey = cacheKey;
2323
return this;
2424
}
2525
public FilterDescriptor<T> Cache(bool cache)
2626
{
27-
Self._Cache = cache;
27+
Self.Cache = cache;
2828
return this;
2929
}
3030

@@ -717,9 +717,9 @@ private FilterDescriptor<T> New(IFilter filter, Action<IFilterContainer> fillPro
717717

718718
private void ResetCache()
719719
{
720-
Self._Cache = null;
721-
Self._CacheKey = null;
722-
Self._FilterName = null;
720+
Self.Cache = null;
721+
Self.CacheKey = null;
722+
Self.FilterName = null;
723723
}
724724

725725
private void SetCacheAndName(IFilter filter)
@@ -728,12 +728,12 @@ private void SetCacheAndName(IFilter filter)
728728
filter.IsStrict = self.IsStrict;
729729
filter.IsVerbatim = self.IsVerbatim;
730730

731-
if (Self._Cache.HasValue)
732-
filter.Cache = Self._Cache;
733-
if (!string.IsNullOrWhiteSpace(Self._FilterName))
734-
filter.FilterName = Self._FilterName;
735-
if (!string.IsNullOrWhiteSpace(Self._CacheKey))
736-
filter.CacheKey = Self._CacheKey;
731+
if (Self.Cache.HasValue)
732+
filter.Cache = Self.Cache;
733+
if (!string.IsNullOrWhiteSpace(Self.FilterName))
734+
filter.FilterName = Self.FilterName;
735+
if (!string.IsNullOrWhiteSpace(Self.CacheKey))
736+
filter.CacheKey = Self.CacheKey;
737737
}
738738

739739

0 commit comments

Comments
 (0)