Created
September 20, 2022 06:36
-
-
Save mgravell/19e705577a60d2d99ea8e05b6becd25e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ProtoContract] | |
class Foo | |
{ | |
public JToken? Bar { get; set; } | |
[ProtoMember(1)] | |
[SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "Used for serialization")] | |
private string? BarSerialized | |
{ | |
get => Bar?.ToString(); | |
set => Bar = value is null ? null : JToken.Parse(value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment