Skip to content

Commit 83a0740

Browse files
committed
Made FieldName properties public
1 parent bcfacac commit 83a0740

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/NRedisStack/Search/FieldName.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ namespace NRedisStack.Search
22
{
33
public class FieldName
44
{
5-
private readonly string fieldName;
6-
private string? alias;
5+
public string Name { get; }
6+
public string? Alias { get; private set; }
77

88
public FieldName(string name) : this(name, null) { }
99

1010
public FieldName(string name, string? attribute)
1111
{
12-
this.fieldName = name;
13-
this.alias = attribute;
12+
this.Name = name;
13+
this.Alias = attribute;
1414
}
1515

1616
public int AddCommandArguments(List<object> args)
1717
{
18-
args.Add(fieldName);
19-
if (alias == null)
18+
args.Add(Name);
19+
if (Alias is null)
2020
{
2121
return 1;
2222
}
2323

2424
args.Add("AS");
25-
args.Add(alias);
25+
args.Add(Alias);
2626
return 3;
2727
}
2828

@@ -33,7 +33,7 @@ public static FieldName Of(string name)
3333

3434
public FieldName As(string attribute)
3535
{
36-
this.alias = attribute;
36+
this.Alias = attribute;
3737
return this;
3838
}
3939
}

0 commit comments

Comments
 (0)