From f17663cde00db03c8aee37ece1a1856cd5376901 Mon Sep 17 00:00:00 2001 From: Jon Sagara Date: Thu, 16 Nov 2023 07:24:42 -0800 Subject: [PATCH] Make EntityHelper public. --- Directory.Build.props | 2 +- src/Sagara.Core.Data/Models/EntityHelper.cs | 4 +++- .../docs/Sagara.Core.Data.Models.EntityHelper.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6f9e958..46760d4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -5,7 +5,7 @@ 12.0 - 2.0.5 + 2.0.6 2.0.0 2.0.0 Jon Sagara diff --git a/src/Sagara.Core.Data/Models/EntityHelper.cs b/src/Sagara.Core.Data/Models/EntityHelper.cs index ba7c438..4e6d875 100644 --- a/src/Sagara.Core.Data/Models/EntityHelper.cs +++ b/src/Sagara.Core.Data/Models/EntityHelper.cs @@ -3,7 +3,7 @@ /// /// Methods to help with objects. /// -internal static class EntityHelper +public static class EntityHelper { /// /// Common method to initialize the CreateUtc and UpdateUtc properties on classes that @@ -12,6 +12,8 @@ internal static class EntityHelper /// The instance to update. public static void InitializeDates(IEntity entity) { + Check.NotNull(entity); + var utcNow = DateTime.UtcNow; entity.CreateUtc = utcNow; diff --git a/src/Sagara.Core.Data/docs/Sagara.Core.Data.Models.EntityHelper.md b/src/Sagara.Core.Data/docs/Sagara.Core.Data.Models.EntityHelper.md index ac6047a..6fd1ebf 100644 --- a/src/Sagara.Core.Data/docs/Sagara.Core.Data.Models.EntityHelper.md +++ b/src/Sagara.Core.Data/docs/Sagara.Core.Data.Models.EntityHelper.md @@ -6,7 +6,7 @@ Methods to help with [Entity](Sagara.Core.Data.Models.Entity.md 'Sagara.Core.Data.Models.Entity') objects. ```csharp -internal static class EntityHelper +public static class EntityHelper ``` Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') 🡒 EntityHelper