.
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user