namespace Monitoring.Core.Domain;
public class Name
{
	public const int MaxLength = 100;
	public string Value { get; }

	private Name(string value)
	{
		Value = value;
	}

	public static Name Create(string value)
	{
		if (string.IsNullOrWhiteSpace(value))
		{
			throw new ArgumentNullException(nameof(value));
		}

		if (value.Length > MaxLength)
		{
			throw new ArgumentOutOfRangeException(nameof(value));
		}

		return new Name(value);
	}
}
