-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Florian Bernd <[email protected]>
- Loading branch information
1 parent
d7f2239
commit f7c637e
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/Elastic.Clients.Elasticsearch.Shared/Types/Core/Search/SourceConfigParam.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed to Elasticsearch B.V under one or more agreements. | ||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
|
||
using Elastic.Transport; | ||
|
||
#if ELASTICSEARCH_SERVERLESS | ||
namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; | ||
#else | ||
namespace Elastic.Clients.Elasticsearch.Core.Search; | ||
#endif | ||
|
||
public partial class SourceConfigParam : | ||
IUrlParameter | ||
{ | ||
public string GetString(ITransportConfiguration settings) => | ||
Tag switch | ||
{ | ||
0 => UrlFormatter.CreateString(Item1, settings)!, | ||
1 => UrlFormatter.CreateString(Item2, settings)!, | ||
_ => throw new InvalidOperationException() | ||
}; | ||
} |