You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Globalization/Languages/LanguageArgs.cs

47 lines
1.2 KiB

2 years ago
using System.ComponentModel.DataAnnotations;
using Connected;
using Connected.Notifications;
namespace Connected.Globalization.Languages;
/// <summary>
/// The arguments used when inserting a new <see cref="ILanguage"/>.
/// </summary>
public class LanguageInsertArgs : IEventArgs
{
/// <summary>
/// The language name.
/// </summary>
[Required]
[MaxLength(128)]
public string? Name { get; init; }
/// <summary>
/// The locale id of the language. This should point to one of the
/// supported .NET Core supported languages.
/// </summary>
public int Lcid { get; init; }
/// <summary>
/// The language mappings, separated with ',' character.
/// </summary>
public string? Mappings { get; init; }
}
/// <summary>
/// The arguments used when updating a language.
/// </summary>
public sealed class LanguageUpdateArgs : LanguageInsertArgs
{
public int Id { get; init; }
}
/// <summary>
/// The arguments used when resolving a lnaguge by its mapping.
/// </summary>
public class LanguageResolveArgs : IDto
{
/// <summary>
/// The mapping string whose values will be compared with a mapping
/// property of the language. Use ',' separator when using multiple
/// mappings.
/// </summary>
public string? Mapping { get; init; }
}