IBookmarksManager.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using Microsoft.CmdPal.Ext.Bookmarks.Persistence; 6 7 namespace Microsoft.CmdPal.Ext.Bookmarks; 8 9 internal interface IBookmarksManager 10 { 11 event Action<BookmarkData>? BookmarkAdded; 12 13 event Action<BookmarkData, BookmarkData>? BookmarkUpdated; 14 15 event Action<BookmarkData>? BookmarkRemoved; 16 17 IReadOnlyCollection<BookmarkData> Bookmarks { get; } 18 19 BookmarkData Add(string name, string bookmark); 20 21 bool Remove(Guid id); 22 23 BookmarkData? Update(Guid id, string name, string bookmark); 24 }