Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

AppSettingsSavingEvent.cs

namespace Nop.Core.Configuration;

/// 
/// Represents the event that is raised when App Settings are saving
/// 
public partial class AppSettingsSavingEvent
{
    #region Ctor

    public AppSettingsSavingEvent(IList configurations)
    {
        Configurations = configurations;
    }

    #endregion

    #region Methods

    /// 
    /// Add configuration to save
    /// 
    /// Configuration to save
    public void AddConfig(TConfig config) where TConfig : class, IConfig
    {
        if (Configurations.OfType().FirstOrDefault() is TConfig currentConfig)
            Configurations[Configurations.IndexOf(currentConfig)] = config;
        else
            Configurations.Add(config);
    }

    #endregion

    #region Properties

    /// 
    /// Gets configurations to save
    /// 
    public IList Configurations { get; protected set; }

    #endregion
}