Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CSGSI/Nodes/NodeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class NodeBase
/// <summary>
/// The data that was passed via JSON.
/// </summary>
protected JObject _data;
protected readonly JObject _data;

/// <summary>
/// The raw JSON string that was used to construct this node.
Expand All @@ -22,7 +22,7 @@ public class NodeBase
/// <summary>
/// Whether or not this node contains data (i.e. JSON string is not empty)
/// </summary>
public bool HasData => !string.IsNullOrWhiteSpace(JSON);
public bool HasData { get; private set; }

internal NodeBase(string json)
{
Expand All @@ -31,6 +31,7 @@ internal NodeBase(string json)
if (json.Equals("") || json.Equals("true", StringComparison.InvariantCultureIgnoreCase))
{
json = "{}";
HasData = false;
}
_data = JObject.Parse(json);
JSON = json;
Expand Down