예제 #1
0
        public IReadOnlyList <SavedLogSearch> DeleteSavedSearch(string name, string query)
        {
            using var scope = _scopeProvider.CreateScope(autoComplete: true);
            var item = _logViewerQueryRepository.GetByName(name);

            _logViewerQueryRepository.Delete(item);
            //Return the updated object - so we can instantly reset the entire array from the API response
            return(GetSavedSearches());
        }
예제 #2
0
    public IReadOnlyList <SavedLogSearch>?DeleteSavedSearch(string?name, string?query)
    {
        using IScope scope = _scopeProvider.CreateScope(autoComplete: true);
        ILogViewerQuery?item = name is null ? null : _logViewerQueryRepository.GetByName(name);

        if (item is not null)
        {
            _logViewerQueryRepository.Delete(item);
        }

        // Return the updated object - so we can instantly reset the entire array from the API response
        return(GetSavedSearches());
    }