Renamed EntityEvaluate to EntityQuery

This commit is contained in:
EzFeDezy
2025-04-27 19:45:55 +02:00
parent 6e0d82ad3c
commit c955182933
2 changed files with 4 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ public class OptionsEntity : OptionsCommand
} }
public class OptionsEntityEvaluate : OptionsEntity public class OptionsEntityQuery : OptionsEntity
{ {
[Option('s', Required = true, HelpText = "Searchdomain to be searched")] [Option('s', Required = true, HelpText = "Searchdomain to be searched")]
public required string Searchdomain { get; set; } public required string Searchdomain { get; set; }

View File

@@ -183,7 +183,7 @@ parser.ParseArguments<OptionsCommand>(args).WithParsed<OptionsCommand>(opts =>
{ {
if (opts.IsEvaluate) if (opts.IsEvaluate)
{ {
parser.ParseArguments<OptionsEntityEvaluate>(args).WithParsed<OptionsEntityEvaluate>(opts => parser.ParseArguments<OptionsEntityQuery>(args).WithParsed<OptionsEntityQuery>(opts =>
{ {
Console.WriteLine("The results:"); Console.WriteLine("The results:");
var search = Search(opts); var search = Search(opts);
@@ -197,7 +197,7 @@ parser.ParseArguments<OptionsCommand>(args).WithParsed<OptionsCommand>(opts =>
Console.WriteLine($"{search[i].Item1} {search[i].Item2}"); Console.WriteLine($"{search[i].Item1} {search[i].Item2}");
} }
}) })
.WithNotParsed<OptionsEntityEvaluate>(action => .WithNotParsed<OptionsEntityQuery>(action =>
{ {
PrintErrorUndeterminedAction("entity"); PrintErrorUndeterminedAction("entity");
retval = 1; retval = 1;
@@ -308,7 +308,7 @@ parser.ParseArguments<OptionsCommand>(args).WithParsed<OptionsCommand>(opts =>
return retval; return retval;
static List<(float, string)> Search(OptionsEntityEvaluate optionsEntityIndex) static List<(float, string)> Search(OptionsEntityQuery optionsEntityIndex)
{ {
var searchdomain = GetSearchdomain(optionsEntityIndex.OllamaURL, optionsEntityIndex.Searchdomain, optionsEntityIndex.IP, optionsEntityIndex.Username, optionsEntityIndex.Password); var searchdomain = GetSearchdomain(optionsEntityIndex.OllamaURL, optionsEntityIndex.Searchdomain, optionsEntityIndex.IP, optionsEntityIndex.Username, optionsEntityIndex.Password);
List<(float, string)> results = searchdomain.Search(optionsEntityIndex.Query); List<(float, string)> results = searchdomain.Search(optionsEntityIndex.Query);