/// <summary> /// Saves all feature properties to the storage. /// </summary> private bool Save(KnownFeature feature) { if (!_options.ContainsKey(feature)) { return(false); } if (_deletedOptions.ContainsKey(feature)) { var options = _options[feature]; foreach (var deleted in _deletedOptions[feature]) { if (options.ContainsKey(deleted)) { options.Remove(deleted); } } } _optionsPersistenceService.SaveOptions(feature, _options[feature]); _log.LogMessage($"Options saved: {feature.GetDescription()}", LOG_CATEGORY); return(true); }
/// <summary> /// Custom: logs feature message and exception. /// </summary> public static void LogMessage(this ILog log, KnownFeature feature, string message, Exception ex) { log.LogMessage(message, ex, feature.GetDescription()); }
/// <summary> /// Returns feature friendly name. /// </summary> /// <param name="feature">Feature.</param> /// <returns>Feature name.</returns> public string GetFeatureName(KnownFeature feature) { return(feature.GetDescription()); }