using System; using System.Text.RegularExpressions; namespace RPGCoreCommon.Settings { [AttributeUsage(AttributeTargets.Class)] public class CustomSettingsAttribute : Attribute { internal string path { private set; get; } /// /// Optionally attached to class that extends .
/// All paths in project should be unique otherwise different name will be generated. ///
/// custom path and name with "/" as delimiter. public CustomSettingsAttribute(string path) { this.path = new Regex("/+").Replace(path, "/").Trim('/'); } } }