|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | +using System.Text; |
| 5 | + |
| 6 | +namespace Elasticsearch.Net |
| 7 | +{ |
| 8 | + #pragma warning disable 0618 |
| 9 | + using System.Threading.Tasks; |
| 10 | + using IndicesDeleteAliasSelector = Func<IndicesDeleteAliasRequestParameters, IndicesDeleteAliasRequestParameters>; |
| 11 | + #pragma warning restore 0618 |
| 12 | + |
| 13 | + [Obsolete("Scheduled to be removed in 2.0, renamed to DeleteAliasRequestParameters")] |
| 14 | + public class IndicesDeleteAliasRequestParameters : DeleteAliasRequestParameters { } |
| 15 | + |
| 16 | + public static class IndicesDeleteAliasClientExtensions |
| 17 | + { |
| 18 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of DeleteAliasRequestParameters")] |
| 19 | + public static ElasticsearchResponse<T> IndicesDeleteAlias<T>(this IElasticsearchClient client, string index, string name, Func<IndicesDeleteAliasRequestParameters, IndicesDeleteAliasRequestParameters> requestParameters = null) |
| 20 | + { |
| 21 | + var selector = Obsolete.UpCastSelector<IndicesDeleteAliasRequestParameters, DeleteAliasRequestParameters>(requestParameters); |
| 22 | + return client.IndicesDeleteAlias<T>(index, name, selector); |
| 23 | + } |
| 24 | + |
| 25 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of DeleteAliasRequestParameters")] |
| 26 | + public static Task<ElasticsearchResponse<T>> IndicesDeleteAliasAsync<T>(this IElasticsearchClient client, string index, string name, Func<IndicesDeleteAliasRequestParameters, IndicesDeleteAliasRequestParameters> requestParameters = null) |
| 27 | + { |
| 28 | + var selector = Obsolete.UpCastSelector<IndicesDeleteAliasRequestParameters, DeleteAliasRequestParameters>(requestParameters); |
| 29 | + return client.IndicesDeleteAliasAsync<T>(index, name, selector); |
| 30 | + } |
| 31 | + |
| 32 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of DeleteAliasRequestParameters")] |
| 33 | + public static ElasticsearchResponse<DynamicDictionary> IndicesDeleteAlias(this IElasticsearchClient client, string index, string name, Func<IndicesDeleteAliasRequestParameters, IndicesDeleteAliasRequestParameters> requestParameters = null) |
| 34 | + { |
| 35 | + var selector = Obsolete.UpCastSelector<IndicesDeleteAliasRequestParameters, DeleteAliasRequestParameters>(requestParameters); |
| 36 | + return client.IndicesDeleteAlias(index, name, selector); |
| 37 | + } |
| 38 | + |
| 39 | + [Obsolete("Scheduled to be removed in 2.0, use the method that takes a Func of DeleteAliasRequestParameters")] |
| 40 | + public static Task<ElasticsearchResponse<DynamicDictionary>> IndicesDeleteAliasAsync(this IElasticsearchClient client, string index, string name, Func<IndicesDeleteAliasRequestParameters, IndicesDeleteAliasRequestParameters> requestParameters = null) |
| 41 | + { |
| 42 | + var selector = Obsolete.UpCastSelector<IndicesDeleteAliasRequestParameters, DeleteAliasRequestParameters>(requestParameters); |
| 43 | + return client.IndicesDeleteAliasAsync(index, name, selector); |
| 44 | + } |
| 45 | + } |
| 46 | +} |
0 commit comments