Skip to content

Commit b5542c0

Browse files
committed
Applied PR feedback.
1 parent 043edd6 commit b5542c0

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

Microsoft.Toolkit.Services/Services/Twitter/TwitterCoordinatesConverter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ public override bool CanConvert(Type objectType)
1818
return false;
1919
}
2020

21-
private readonly JsonConverter<double> _doubleConverter;
21+
private readonly JsonConverter<double> doubleConverter;
2222

2323
public TwitterCoordinatesConverter(JsonSerializerOptions options)
2424
{
25-
_doubleConverter = options?.GetConverter(typeof(double)) as JsonConverter<double> ?? throw new InvalidOperationException();
25+
doubleConverter = options?.GetConverter(typeof(double)) as JsonConverter<double> ?? throw new InvalidOperationException();
2626
}
2727

2828
public override TwitterCoordinates Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
@@ -104,7 +104,7 @@ public override TwitterCoordinates Read(ref Utf8JsonReader reader, Type typeToCo
104104
private double ReadProperty(ref Utf8JsonReader reader, JsonSerializerOptions options)
105105
{
106106
reader.Read();
107-
return _doubleConverter.Read(ref reader, typeof(double), options);
107+
return doubleConverter.Read(ref reader, typeof(double), options);
108108
}
109109

110110
public override void Write(Utf8JsonWriter writer, TwitterCoordinates value, JsonSerializerOptions options)

Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/Drawables/InkDrawable.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ internal class InkDrawable : IDrawable
3030

3131
internal static readonly InkStrokeBuilder StrokeBuilder = new InkStrokeBuilder();
3232

33+
// Don't remove! Used for deserialization.
3334
public InkDrawable()
3435
{
3536
}

Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/Drawables/TextDrawable.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ internal class TextDrawable : IDrawable
3232

3333
public bool IsItalic { get; set; }
3434

35+
// Don't remove! Used for deserialization.
3536
public TextDrawable()
3637
{
3738
}

Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/JsonConverters/IDrawableConverter.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
1111
{
1212
internal class IDrawableConverter : JsonConverter<IDrawable>
1313
{
14-
public IDrawableConverter()
15-
{
16-
}
17-
1814
public override bool CanConvert(Type typeToConvert) => typeof(IDrawable).IsAssignableFrom(typeToConvert);
1915

2016
public override IDrawable Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)

0 commit comments

Comments
 (0)