public IEnumerable <string> GetCategories() { LogStart(nameof(GetCategories)); try { return(_reader.GetCategories()); } catch (Exception ex) when(LogError(nameof(GetCategories), ex)) { throw; } finally { LogStop(nameof(GetCategories)); } }
/// <summary> /// Get the list of categories which are part of the state of the engine that was saved in the store. /// </summary> /// <returns>The list of categories.</returns> /// <exception cref="EngineUnloadedException">The request is rejected because the engine has been unloaded.</exception> /// <exception cref="ObjectDisposedException">The reader has been disposed.</exception> public IEnumerable <string> GetCategories() { CheckAccess(); return(_reader.GetCategories()); }
#pragma warning disable IDE0079 // Remove unnecessary suppression #pragma warning disable IDE0057 // Substring can be simplified. (Suppressing here for simplicify with multi-targeting.) public IEnumerable <string> GetCategories() => _reader.GetCategories().Where(c => c.StartsWith(_prefix, StringComparison.Ordinal) && c.Length > _prefix.Length).Select(c => c.Substring(_prefix.Length));