Skip to content

Commit e96cfb8

Browse files
fixed compiler warnings regarding the properties not being set due to the parameterless constructor used by InvalidEntry required by protobuf-net.
Just gave default empty strings to the properties it was either that or wrapping the constructor in a pragma to squash the warning.
1 parent 1d58b94 commit e96cfb8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Source/Flow.Core/Common/Models/InvalidEntry.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ public sealed record InvalidEntry
1616
/// Gets the failure message
1717
/// </summary>
1818
[ProtoMember(1)]
19-
public string FailureMessage { get; }
19+
public string FailureMessage { get; } = "";
2020

2121
/// <summary>
2222
/// Gets the object path to the member failure
2323
/// </summary>
2424
[ProtoMember(2)]
25-
public string Path { get; }
25+
public string Path { get; } = "";
2626

2727
/// <summary>
2828
/// Gets the property name of the failing member
2929
/// </summary>
3030
[ProtoMember(3)]
31-
public string PropertyName { get; }
31+
public string PropertyName { get; } = "";
3232

3333
/// <summary>
3434
/// Gets the display / label name that the user sees
3535
/// </summary>
3636
[ProtoMember(4)]
37-
public string DisplayName { get; }
37+
public string DisplayName { get; } = "";
3838

3939
/// <summary>
4040
/// Gets the cause of the failure which should be validation unless
4141
/// the failure was due to a configuration or system error
4242
/// </summary>
4343
[ProtoMember(5)]
44-
public string Cause { get; }
44+
public string Cause { get; } = "";
4545

4646
/// <summary>
4747
/// Initialises a new InvalidEntry.
@@ -64,4 +64,5 @@ public InvalidEntry(string failureMessage, string path = "", string propertyName
6464
}
6565

6666
private InvalidEntry() { }
67-
}
67+
}
68+
//need to fix the warnings either wrap constructor with pragma or use init and = ""

0 commit comments

Comments
 (0)