示例#1
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            Guid guid;

            return(Guid.TryParse(Convert.ToString(reader.Value), out guid)
                                ? ToggleID.Parse(guid)
                                : null);
        }
示例#2
0
 protected override object Parse(string value) => ToggleID.Parse(Guid.Parse(value));