private void OnDeserialized(StreamingContext context) { Flags = RevisionFlags.None; if (Minor) { Flags |= RevisionFlags.Minor; } if (Bot) { Flags |= RevisionFlags.Bot; } if (New) { Flags |= RevisionFlags.Create; } if (Anon) { Flags |= RevisionFlags.Anonymous; } HiddenFields = RevisionHiddenFields.None; if (UserHidden) { HiddenFields |= RevisionHiddenFields.User; } }
private void OnDeserialized(StreamingContext context) { Flags = RevisionFlags.None; if (Minor) { Flags |= RevisionFlags.Minor; } if (Bot) { Flags |= RevisionFlags.Bot; } if (New) { Flags |= RevisionFlags.Create; } if (Anon) { Flags |= RevisionFlags.Anonymous; } HiddenFields = RevisionHiddenFields.None; if (UserHidden) { HiddenFields |= RevisionHiddenFields.User; } // Make compatible with the slot-based revision JSON if (Slots != null && Slots.TryGetValue(RevisionSlot.MainSlotName, out var mainSlot)) { Debug.Assert(mainSlot != null); if (Content == null) { Content = mainSlot.Content; } if (ContentLength == 0) { ContentLength = mainSlot.ContentLength; } if (ContentModel == null) { ContentModel = mainSlot.ContentModel; } if (Sha1 == null) { Sha1 = mainSlot.Sha1; } } }