mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 15:11:10 +00:00
Rewords additional code comments as complete sentences
This commit is contained in:
1 parent
36e43b7999
commit
871644b3c9
23 files changed
+171
-140
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Common.Primitives;
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
@@ -21,9 +22,9 @@ public abstract class Entity<TId> : IEquatable<Entity<TId>> where TId : notnull
|
||||
public DateTime CreatedOnUtc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date and time when the entity was last updated.
|
||||
/// Gets the date and time when the entity was last updated, if applicable.
|
||||
/// </summary>
|
||||
public DateTime? UpdatedOnUtc { get; set; }
|
||||
public Optional<DateTime> UpdatedOnUtc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Entity{TId}"/> class.
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Lumina.Domain.Common.Primitives;
|
||||
using Lumina.Domain.Common.Models.Core;
|
||||
|
||||
using Lumina.Domain.Common.Errors;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
@@ -49,17 +48,9 @@ public class LanguageInfo : ValueObject
|
||||
/// <param name="languageCode">The ISO 639-1 two-letter language code.</param>
|
||||
/// <param name="languageName">The full name of the language in English.</param>
|
||||
/// <param name="nativeName">The optional native name of the language.</param>
|
||||
/// <returns>
|
||||
/// An <see cref="Result{TValue}"/> containing either a successfully created <see cref="LanguageInfo"/>, or an error message.
|
||||
/// </returns>
|
||||
public static Result<LanguageInfo> Create(string? languageCode, string? languageName, Optional<string> nativeName)
|
||||
/// <returns>The created <see cref="LanguageInfo"/>.</returns>
|
||||
public static LanguageInfo Create(string languageCode, string languageName, Optional<string> nativeName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(languageCode))
|
||||
return Errors.Errors.Metadata.LanguageCodeCannotBeEmpty;
|
||||
if (string.IsNullOrWhiteSpace(languageName))
|
||||
return Errors.Errors.Metadata.LanguageNameCannotBeEmpty;
|
||||
if (languageCode.Length != 2)
|
||||
return Errors.Errors.Metadata.InvalidIsoCode;
|
||||
return new LanguageInfo(languageCode, languageName, nativeName);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user