private static bool TryParseLike(ref ParseContext pctx, out LikeStub like) { pctx.Move(1); like = default; return(ReadLikeProperty(ref pctx, ref like) && ReadLikeProperty(ref pctx, ref like)); }
private static bool ReadLikeProperty(ref ParseContext pctx, ref LikeStub l) { if (pctx.StartsWith(FastJson.idProp)) { pctx.Move(5); // skip "id": return(TryReadUInt(ref pctx, out l.id) && !Database.NotExists(l.id)); } if (pctx.StartsWith(FastJson.tsProp)) { pctx.Move(5); // skip "id": return(TryReadInt(ref pctx, out l.ts)); } return(false); }