From 83a07406fb62332ceb593059dc8d9d7bf720bf7d Mon Sep 17 00:00:00 2001 From: zhskay Date: Wed, 25 Dec 2024 14:25:36 +0700 Subject: [PATCH] Made FieldName properties public --- src/NRedisStack/Search/FieldName.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/NRedisStack/Search/FieldName.cs b/src/NRedisStack/Search/FieldName.cs index b07d23f4..eee3ca7e 100644 --- a/src/NRedisStack/Search/FieldName.cs +++ b/src/NRedisStack/Search/FieldName.cs @@ -2,27 +2,27 @@ namespace NRedisStack.Search { public class FieldName { - private readonly string fieldName; - private string? alias; + public string Name { get; } + public string? Alias { get; private set; } public FieldName(string name) : this(name, null) { } public FieldName(string name, string? attribute) { - this.fieldName = name; - this.alias = attribute; + this.Name = name; + this.Alias = attribute; } public int AddCommandArguments(List args) { - args.Add(fieldName); - if (alias == null) + args.Add(Name); + if (Alias is null) { return 1; } args.Add("AS"); - args.Add(alias); + args.Add(Alias); return 3; } @@ -33,7 +33,7 @@ public static FieldName Of(string name) public FieldName As(string attribute) { - this.alias = attribute; + this.Alias = attribute; return this; } }