47 lines
912 B
C#
47 lines
912 B
C#
using Core.Abstractions;
|
|
using Core.Abstractions.Models;
|
|
using Core.DomainObjects.L10n;
|
|
using Core.Enumerations;
|
|
|
|
namespace WeatherForecast.Models.L10n {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class ImageL10nModel : ModelBase {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Locale { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Alt { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public ImageL10nModel() { }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="imageL10n"></param>
|
|
public ImageL10nModel(ImageL10n imageL10n) {
|
|
Locale = imageL10n.Locale.Name;
|
|
Alt = imageL10n.Alt;
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ImageL10n ToDomainObject() => new() {
|
|
Locale = Enumeration.FromDisplayName<Locales>(Locale),
|
|
Alt = Alt
|
|
};
|
|
}
|
|
}
|