private unsafe void deSerialize(AutoCSer.Json.Parser parser) { switch (parser.TypeParse <int>()) { case 1: Value = null; return; case 2: Value = string.Empty; return; default: parser.MoveRead(-1); return; } }
private static unsafe void deSerialize(AutoCSer.Json.Parser parser, ref CustomClass value) { char *read = parser.CustomRead; if (parser.VerifyRead(1)) { switch (*(char *)read) { case '1': value = new CustomClass { Value = null }; return; case '2': value = new CustomClass { Value = string.Empty }; return; default: parser.MoveRead(-1); return; } } }