public static void Add(string path, Type type) { EditorFile editorFile = _history.FirstOrDefault(e => e.Path == path); if (editorFile is null) { _history.Insert(0, new EditorFile(path, type)); while (_history.Count > 10) { _history.RemoveAt(10); } } else { _history.Remove(editorFile); _history.Insert(0, editorFile); } Save(); FileHistoryChanged?.Invoke(); }
public static void Remove(EditorFile editorFile) { _history.Remove(editorFile); Save(); FileHistoryChanged?.Invoke(); }