public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue(nameof(Filesystem), Filesystem, typeof(NDSFilesystem)); info.AddValue(nameof(Parent), Parent, typeof(NDSDirectory)); info.AddValue(nameof(EntryID), EntryID); info.AddValue(nameof(Name), Name); info.AddValue(nameof(changes), changes, typeof(Stack <VCSChange>)); // Small optimization: If there are no changes, don't save latest version patch if (changes.Count == 0) { info.AddValue("latestVersionPatch", null, typeof(XDeltaPatch?)); } else { var latestVersionPatch = new XDeltaPatch(RetrieveOriginalData().GetAsArrayCopy(), latestVersion); info.AddValue("latestVersionPatch", latestVersionPatch, typeof(XDeltaPatch)); } }
public VCSChange(SerializationInfo info, StreamingContext context) { RollbackPatch = (XDeltaPatch)info.GetValue(nameof(RollbackPatch), typeof(XDeltaPatch)); ParentCommit = (VCSCommit)info.GetValue(nameof(ParentCommit), typeof(VCSCommit)); ParentFile = (NDSFile)info.GetValue(nameof(ParentFile), typeof(NDSFile)); }
public VCSChange(VCSCommit parentCommit, NDSFile parentFile, XDeltaPatch rollbackPatch) { RollbackPatch = rollbackPatch; ParentCommit = parentCommit; ParentFile = parentFile; }