using System;
namespace SessionZero.Data;
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class SzfObjectAttribute : Attribute
{
///
/// The unique string identifier for the SzfObject type (e.g., "dataset", "character_template", "character").
/// This is used in the `!type:` header of .szf files.
///
public string TypeIdentifier { get; }
///
/// Initializes a new instance of the class.
///
/// The unique string identifier for the SzfObject type.
public SzfObjectAttribute(string typeIdentifier)
{
if (string.IsNullOrWhiteSpace(typeIdentifier))
{
throw new ArgumentException("Type identifier cannot be null or whitespace.", nameof(typeIdentifier));
}
TypeIdentifier = typeIdentifier;
}
}