static bool InsertCopyable(ISelectParent parent, Copyable copyable, int right, string action, out InsertCopyableUndoEntry entry) { entry = null; if (!parent.ChildType.IsAssignableFrom(copyable.Type)) { return(false); } entry = new InsertCopyableUndoEntry(parent, copyable, right, action); return(true); }
ReplaceUndoEntry(BinaryReader reader, int version) : base(reader, version) { delete = (DeleteUndoEntry)DecodeEntry(reader, version); insert = (InsertCopyableUndoEntry)DecodeEntry(reader, version); }
public ReplaceUndoEntry(ISelectParent parent, DeleteUndoEntry delete, InsertCopyableUndoEntry insert) : base($"{parent.ChildString} Replaced", parent) { this.delete = delete; this.insert = insert; }