using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.Settings
{
///
/// Represents a settings object base class.
///
public abstract class SettingsBase
{
internal Action SaveAction { get; set; }
///
/// Saves settings.
///
/// This settings instance is not registered with any settings manager.
public virtual void Save()
{
if (SaveAction == null)
{
throw new InvalidOperationException("This settings instance is not registered with any settings manager.");
}
SaveAction();
}
}
}