File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/Nest/CommonAbstractions/Infer/Fields Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ string IUrlParameter.GetString(IConnectionConfigurationValues settings) =>
2121 public static implicit operator Fields ( string [ ] fields ) => new Fields ( fields . Select ( f => ( Field ) f ) ) ;
2222
2323 public static implicit operator Fields ( Expression [ ] fields ) => new Fields ( fields . Select ( f => ( Field ) f ) ) ;
24+
25+ public static implicit operator Fields ( Field [ ] fields ) => new Fields ( fields ) ;
2426
2527 public static implicit operator Fields ( Field field ) => new Fields ( new [ ] { field } ) ;
2628
@@ -40,20 +42,27 @@ public Fields And<T>(params Expression<Func<T, object>>[] fields) where T : clas
4042 this . ListOfFields . AddRange ( fields . Select ( f => ( Field ) f ) ) ;
4143 return this ;
4244 }
45+
4346 public Fields And ( params string [ ] fields )
4447 {
4548 this . ListOfFields . AddRange ( fields . Select ( f => ( Field ) f ) ) ;
4649 return this ;
4750 }
4851
52+ public Fields And ( params Field [ ] fields )
53+ {
54+ this . ListOfFields . AddRange ( fields ) ;
55+ return this ;
56+ }
57+
4958 public IEnumerator < Field > GetEnumerator ( )
5059 {
51- return ( ( IEnumerable < Field > ) this . ListOfFields ) . GetEnumerator ( ) ;
60+ return this . ListOfFields . GetEnumerator ( ) ;
5261 }
5362
5463 IEnumerator IEnumerable . GetEnumerator ( )
5564 {
56- return ( ( IEnumerable < Field > ) this . ListOfFields ) . GetEnumerator ( ) ;
65+ return GetEnumerator ( ) ;
5766 }
5867 }
5968}
You can’t perform that action at this time.
0 commit comments