Skip to content

Commit c62ebd3

Browse files
chore(client): change name of underlying properties for models and params
1 parent 130c438 commit c62ebd3

File tree

69 files changed

+2757
-2847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2757
-2847
lines changed

src/ArcadeDotnet/Core/ModelBase.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ namespace ArcadeDotnet.Core;
1212

1313
public abstract record class ModelBase
1414
{
15-
private protected FreezableDictionary<string, JsonElement> _properties = [];
15+
private protected FreezableDictionary<string, JsonElement> _rawData = [];
1616

17-
public IReadOnlyDictionary<string, JsonElement> Properties
17+
public IReadOnlyDictionary<string, JsonElement> RawData
1818
{
19-
get { return this._properties.Freeze(); }
19+
get { return this._rawData.Freeze(); }
2020
}
2121

2222
internal static readonly JsonSerializerOptions SerializerOptions = new()
@@ -181,7 +181,7 @@ public IReadOnlyDictionary<string, JsonElement> Properties
181181

182182
public sealed override string? ToString()
183183
{
184-
return JsonSerializer.Serialize(this.Properties, _toStringSerializerOptions);
184+
return JsonSerializer.Serialize(this.RawData, _toStringSerializerOptions);
185185
}
186186

187187
public abstract void Validate();
@@ -194,5 +194,5 @@ public IReadOnlyDictionary<string, JsonElement> Properties
194194
/// </summary>
195195
interface IFromRaw<T>
196196
{
197-
static abstract T FromRawUnchecked(IReadOnlyDictionary<string, JsonElement> properties);
197+
static abstract T FromRawUnchecked(IReadOnlyDictionary<string, JsonElement> rawData);
198198
}

src/ArcadeDotnet/Core/ModelConverter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ sealed class ModelConverter<TModel> : JsonConverter<TModel>
1414
JsonSerializerOptions options
1515
)
1616
{
17-
var properties = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(
17+
var rawData = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(
1818
ref reader,
1919
options
2020
);
21-
if (properties == null)
21+
if (rawData == null)
2222
return null;
2323

24-
return TModel.FromRawUnchecked(properties);
24+
return TModel.FromRawUnchecked(rawData);
2525
}
2626

2727
public override void Write(Utf8JsonWriter writer, TModel value, JsonSerializerOptions options)
2828
{
29-
JsonSerializer.Serialize(writer, value.Properties, options);
29+
JsonSerializer.Serialize(writer, value.RawData, options);
3030
}
3131
}

src/ArcadeDotnet/Core/ParamsBase.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ static ParamsBase()
3030
};
3131
}
3232

33-
private protected FreezableDictionary<string, JsonElement> _queryProperties = [];
33+
private protected FreezableDictionary<string, JsonElement> _rawQueryData = [];
3434

35-
public IReadOnlyDictionary<string, JsonElement> QueryProperties
35+
public IReadOnlyDictionary<string, JsonElement> RawQueryData
3636
{
37-
get { return this._queryProperties.Freeze(); }
37+
get { return this._rawQueryData.Freeze(); }
3838
}
3939

40-
private protected FreezableDictionary<string, JsonElement> _headerProperties = [];
40+
private protected FreezableDictionary<string, JsonElement> _rawHeaderData = [];
4141

42-
public IReadOnlyDictionary<string, JsonElement> HeaderProperties
42+
public IReadOnlyDictionary<string, JsonElement> RawHeaderData
4343
{
44-
get { return this._headerProperties.Freeze(); }
44+
get { return this._rawHeaderData.Freeze(); }
4545
}
4646

4747
public abstract Uri Url(ClientOptions options);
@@ -153,7 +153,7 @@ JsonElement element
153153
protected string QueryString(ClientOptions options)
154154
{
155155
NameValueCollection collection = [];
156-
foreach (var item in this.QueryProperties)
156+
foreach (var item in this.RawQueryData)
157157
{
158158
ParamsBase.AddQueryElementToCollection(collection, item.Key, item.Value);
159159
}

0 commit comments

Comments
 (0)