This commit is contained in:
2025-09-03 00:54:40 +04:30
parent a7cdec69a7
commit 3b1e8095ba
4 changed files with 11 additions and 10 deletions
@@ -11,18 +11,16 @@ namespace VizhTalk.Learning.Domain.ValueObjects
}
public LanguageTitle(string title)
{
title = title.Trim();
Guard.NullOrEmpty(title, nameof(LanguageTitle));
Guard.MaxLength(title, nameof(LanguageTitle), 60);
Value = title;
}
public string Value { get; private set; }
public override bool Equals(object? obj)
{
if (obj is string value)
return Value == value;
return base.Equals(obj);
}
public static implicit operator string(LanguageTitle title) => title.Value;
}
}