public ModInfoAttribute(string name, string modID) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (modID == null) { throw new ArgumentNullException(nameof(modID)); } if (name.Length == 0) { throw new ArgumentException( "name can't be empty", nameof(name)); } if (!ModInfo.IsValidModID(modID)) { throw new ArgumentException( $"'{ modID }' is not a valid mod ID. Please use only lowercase letters and numbers.", nameof(modID)); } Name = name; ModID = modID; }
public ModInfoAttribute(string name) : this(name, ModInfo.ToModID(name)) { }