Se actualizo la biblioteca para admitir Ids de tipo Strings

This commit is contained in:
jrojas
2025-01-03 12:02:50 +01:00
parent bc84c1b5a7
commit 5ba0097bc0
121 changed files with 39 additions and 33 deletions
View File
View File
Generated Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+6
View File
@@ -159,6 +159,9 @@ public class AuditService : IAuditService
ObjectId id = (ObjectId)idProperty.GetValue(dataOriginal); ObjectId id = (ObjectId)idProperty.GetValue(dataOriginal);
//TODO verificar si esta bien obtener el valor asi: //TODO verificar si esta bien obtener el valor asi:
auditLogData.RecordId = id.ToString(); auditLogData.RecordId = id.ToString();
}else if (idProperty != null && idProperty.PropertyType == typeof(string))
{
auditLogData.RecordId = idProperty.GetValue(dataModified).ToString();
} }
} }
else if (dataModified != null) else if (dataModified != null)
@@ -171,6 +174,9 @@ public class AuditService : IAuditService
ObjectId id = (ObjectId)idProperty.GetValue(dataModified); ObjectId id = (ObjectId)idProperty.GetValue(dataModified);
//TODO verificar si esta bien obtener el valor asi: //TODO verificar si esta bien obtener el valor asi:
auditLogData.RecordId = id.ToString(); auditLogData.RecordId = id.ToString();
}else if (idProperty != null && idProperty.PropertyType == typeof(string))
{
auditLogData.RecordId = idProperty.GetValue(dataModified).ToString();
} }
} }
View File
View File
View File
View File
View File
View File
+1 -1
View File
@@ -8,7 +8,7 @@
<!-- Informacion para NuGet --> <!-- Informacion para NuGet -->
<PackageId>AuditLogs</PackageId> <PackageId>AuditLogs</PackageId>
<Version>1.0.20</Version> <Version>1.0.22</Version>
<Authors>Epigram</Authors> <Authors>Epigram</Authors>
<Company>Epigram</Company> <Company>Epigram</Company>
<Description>Library for recording audit logs using MongoDB.</Description> <Description>Library for recording audit logs using MongoDB.</Description>
@@ -6,7 +6,7 @@
"compilationOptions": {}, "compilationOptions": {},
"targets": { "targets": {
".NETCoreApp,Version=v8.0": { ".NETCoreApp,Version=v8.0": {
"audit-logs/1.0.20": { "audit-logs/1.0.22": {
"dependencies": { "dependencies": {
"Microsoft.Extensions.Hosting": "8.0.0", "Microsoft.Extensions.Hosting": "8.0.0",
"MongoDB.Driver": "2.23.1", "MongoDB.Driver": "2.23.1",
@@ -569,7 +569,7 @@
} }
}, },
"libraries": { "libraries": {
"audit-logs/1.0.20": { "audit-logs/1.0.22": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
View File
View File
View File
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
@@ -8,7 +8,7 @@
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl> <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl>
<description>Library for recording audit logs using MongoDB.</description> <description>Library for recording audit logs using MongoDB.</description>
<tags>audit logs mongodb</tags> <tags>audit logs mongodb</tags>
<repository type="git" url="https://git.teralevel.io/jrojas/audit/src/branch/master/audit-logs" commit="6327554e6c78280b33d49754e731d310bbf89d1a" /> <repository type="git" url="https://git.teralevel.io/jrojas/audit/src/branch/master/audit-logs" commit="bc84c1b5a7fcfaf1fe295f7a9b17884dc7a0c5f4" />
<dependencies> <dependencies>
<group targetFramework="net8.0"> <group targetFramework="net8.0">
<dependency id="Microsoft.Extensions.Hosting" version="8.0.0" exclude="Build,Analyzers" /> <dependency id="Microsoft.Extensions.Hosting" version="8.0.0" exclude="Build,Analyzers" />
View File
View File
View File
View File
View File
View File
View File
@@ -13,11 +13,11 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Epigram")] [assembly: System.Reflection.AssemblyCompanyAttribute("Epigram")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Library for recording audit logs using MongoDB.")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Library for recording audit logs using MongoDB.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.20.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.22.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.20+6327554e6c78280b33d49754e731d310bbf89d1a")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.22+bc84c1b5a7fcfaf1fe295f7a9b17884dc7a0c5f4")]
[assembly: System.Reflection.AssemblyProductAttribute("audit-logs")] [assembly: System.Reflection.AssemblyProductAttribute("audit-logs")]
[assembly: System.Reflection.AssemblyTitleAttribute("audit-logs")] [assembly: System.Reflection.AssemblyTitleAttribute("audit-logs")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.20.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.22.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://git.teralevel.io/jrojas/audit/src/branch/master/audit-logs")] [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://git.teralevel.io/jrojas/audit/src/branch/master/audit-logs")]
// Generado por la clase WriteCodeFragment de MSBuild. // Generado por la clase WriteCodeFragment de MSBuild.
@@ -1 +1 @@
5cf035fe69dd1917e86105a11c193a7c7359e1fbb4f3bdd45e2479da73c202d2 6493451f7dd447ecac820618a27a0b425fde21d09a04385a327931a4edf0c580
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
@@ -5,7 +5,7 @@
}, },
"projects": { "projects": {
"/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj": { "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj": {
"version": "1.0.19", "version": "1.0.20",
"restore": { "restore": {
"projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
"projectName": "AuditLogs", "projectName": "AuditLogs",
View File
View File
@@ -2567,7 +2567,7 @@
"/home/julian/.nuget/packages/": {} "/home/julian/.nuget/packages/": {}
}, },
"project": { "project": {
"version": "1.0.19", "version": "1.0.20",
"restore": { "restore": {
"projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
"projectName": "AuditLogs", "projectName": "AuditLogs",
@@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "QykavS2sE4Y=", "dgSpecHash": "E8Mu0oI9VA4=",
"success": true, "success": true,
"projectFilePath": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj", "projectFilePath": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
View File
+1 -1
View File
@@ -1 +1 @@
17326358893202983 17328160760523427
+1 -1
View File
@@ -1 +1 @@
17328160760523427 17358944606935849
View File
View File
View File
View File
View File
View File
View File
View File
@@ -8,7 +8,7 @@
".NETCoreApp,Version=v8.0": { ".NETCoreApp,Version=v8.0": {
"audit-test/1.0.0": { "audit-test/1.0.0": {
"dependencies": { "dependencies": {
"AuditLogs": "1.0.19", "AuditLogs": "1.0.20",
"Microsoft.Extensions.Hosting": "8.0.0", "Microsoft.Extensions.Hosting": "8.0.0",
"Microsoft.NET.Test.Sdk": "17.8.0", "Microsoft.NET.Test.Sdk": "17.8.0",
"Mongo2Go": "2.2.16", "Mongo2Go": "2.2.16",
@@ -18,7 +18,7 @@
"NUnit3TestAdapter": "4.5.0", "NUnit3TestAdapter": "4.5.0",
"coverlet.collector": "6.0.0", "coverlet.collector": "6.0.0",
"xunit": "2.9.2", "xunit": "2.9.2",
"audit-logs": "1.0.19.0" "audit-logs": "1.0.21.0"
}, },
"runtime": { "runtime": {
"audit-test.dll": {} "audit-test.dll": {}
@@ -944,7 +944,7 @@
} }
} }
}, },
"AuditLogs/1.0.19": { "AuditLogs/1.0.20": {
"dependencies": { "dependencies": {
"Microsoft.Extensions.Hosting": "8.0.0", "Microsoft.Extensions.Hosting": "8.0.0",
"MongoDB.Driver": "2.23.1", "MongoDB.Driver": "2.23.1",
@@ -953,16 +953,16 @@
}, },
"runtime": { "runtime": {
"audit-logs.dll": { "audit-logs.dll": {
"assemblyVersion": "1.0.19", "assemblyVersion": "1.0.20",
"fileVersion": "1.0.19.0" "fileVersion": "1.0.21.0"
} }
} }
}, },
"audit-logs/1.0.19.0": { "audit-logs/1.0.21.0": {
"runtime": { "runtime": {
"audit-logs.dll": { "audit-logs.dll": {
"assemblyVersion": "1.0.19.0", "assemblyVersion": "1.0.21.0",
"fileVersion": "1.0.19.0" "fileVersion": "1.0.21.0"
} }
} }
} }
@@ -1471,12 +1471,12 @@
"path": "zstdsharp.port/0.7.3", "path": "zstdsharp.port/0.7.3",
"hashPath": "zstdsharp.port.0.7.3.nupkg.sha512" "hashPath": "zstdsharp.port.0.7.3.nupkg.sha512"
}, },
"AuditLogs/1.0.19": { "AuditLogs/1.0.20": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"audit-logs/1.0.19.0": { "audit-logs/1.0.21.0": {
"type": "reference", "type": "reference",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""

Some files were not shown because too many files have changed in this diff Show More