Skip to content

Commit

Permalink
Remove params overloads (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Oct 3, 2024
1 parent 29c9a03 commit bc8b2ff
Showing 1 changed file with 0 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,6 @@ public static CreateIndexRequestDescriptor WithAlias(this CreateIndexRequestDesc
return descriptor;
}

/// <summary>
/// Add multiple aliases to the index at creation time.
/// </summary>
/// <param name="descriptor">A descriptor for an index request.</param>
/// <param name="aliasNames">The names of the aliases.</param>
/// <returns>The <see cref="CreateIndexRequestDescriptor"/> to allow fluent chaining of calls to configure the indexing request.</returns>
public static CreateIndexRequestDescriptor WithAliases(this CreateIndexRequestDescriptor descriptor, params ReadOnlySpan<string> aliasNames)
{
foreach (var name in aliasNames)
descriptor.Aliases(a => a.Add(name, static _ => { }));

return descriptor;
}

/// <summary>
/// Add multiple aliases to the index at creation time.
/// </summary>
/// <param name="descriptor">A descriptor for an index request.</param>
/// <param name="aliasNames">The names of the aliases.</param>
/// <returns>The <see cref="CreateIndexRequestDescriptor"/> to allow fluent chaining of calls to configure the indexing request.</returns>
public static CreateIndexRequestDescriptor WithAliases(this CreateIndexRequestDescriptor descriptor, params string[] aliasNames)
{
foreach (var name in aliasNames)
descriptor.Aliases(a => a.Add(name, static _ => { }));

return descriptor;
}

/// <summary>
/// Adds an alias to the index at creation time.
/// </summary>
Expand All @@ -78,34 +50,4 @@ public static CreateIndexRequestDescriptor<TDocument> WithAlias<TDocument>(this
descriptor.Aliases(a => a.Add(aliasName, static _ => { }));
return descriptor;
}

/// <summary>
/// Add multiple aliases to the index at creation time.
/// </summary>
/// <typeparam name="TDocument">The type representing documents stored in this index.</typeparam>
/// <param name="descriptor">A fluent descriptor for an index request.</param>
/// <param name="aliasNames">The names of the aliases.</param>
/// <returns>The <see cref="CreateIndexRequestDescriptor{TDocument}"/> to allow fluent chaining of calls to configure the indexing request.</returns>
public static CreateIndexRequestDescriptor<TDocument> WithAliases<TDocument>(this CreateIndexRequestDescriptor<TDocument> descriptor, params ReadOnlySpan<string> aliasNames)
{
foreach (var name in aliasNames)
descriptor.Aliases(a => a.Add(name, static _ => { }));

return descriptor;
}

/// <summary>
/// Add multiple aliases to the index at creation time.
/// </summary>
/// <typeparam name="TDocument">The type representing documents stored in this index.</typeparam>
/// <param name="descriptor">A fluent descriptor for an index request.</param>
/// <param name="aliasNames">The names of the aliases.</param>
/// <returns>The <see cref="CreateIndexRequestDescriptor{TDocument}"/> to allow fluent chaining of calls to configure the indexing request.</returns>
public static CreateIndexRequestDescriptor<TDocument> WithAliases<TDocument>(this CreateIndexRequestDescriptor<TDocument> descriptor, params string[] aliasNames)
{
foreach (var name in aliasNames)
descriptor.Aliases(a => a.Add(name, static _ => { }));

return descriptor;
}
}

0 comments on commit bc8b2ff

Please sign in to comment.