se implemento el patron IoC y se creo documentacion en los metodos
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using audit_logs.Models.AppSettings;
|
||||
using audit_logs.Repositories;
|
||||
using audit.Repositories;
|
||||
using audit_logs.Repositories.Interfaces;
|
||||
using audit_logs.Services;
|
||||
using audit_logs.Services.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace audit_logs.Extensions;
|
||||
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddAuditServices(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
// Configurar MongoDbSettingsAudit a partir del archivo de configuración appsettings.json
|
||||
services.Configure<MongoDbSettingsAudit>(configuration.GetSection("DatabaseConfigurationAudit"));
|
||||
|
||||
// Registrar AuditService utilizando la configuración de MongoDbSettingsAudit
|
||||
services.AddScoped<IAuditService, AuditService>(sp =>
|
||||
{
|
||||
var options = sp.GetRequiredService<IOptions<MongoDbSettingsAudit>>();
|
||||
return new AuditService(options);
|
||||
});
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using audit_logs.Models.AppSettings;
|
||||
using audit.Repositories;
|
||||
using audit_logs.Repositories.Interfaces;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace audit_logs.Infraestructure;
|
||||
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddMongoDb(this IServiceCollection services, IConfiguration configuration)
|
||||
{
|
||||
// Leer configuración desde el archivo appsettings.json
|
||||
services.Configure<MongoDbSettings>(configuration.GetSection("MongoDbSettings"));
|
||||
|
||||
// Registrar MongoDbSettings como Singleton para ser usado en MongoRepository
|
||||
services.AddSingleton(sp =>
|
||||
{
|
||||
var options = sp.GetRequiredService<IOptions<MongoDbSettings>>().Value;
|
||||
var client = new MongoClient(options.ConnectionString);
|
||||
return client.GetDatabase(options.DatabaseName);
|
||||
});
|
||||
|
||||
// Registrar MongoRepository como servicio genérico
|
||||
services.AddScoped(typeof(IMongoRepository<>), typeof(MongoRepository<>));
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
namespace audit_logs.Models.AppSettings
|
||||
{
|
||||
public class MongoDbSettings
|
||||
public class MongoDbSettingsAudit
|
||||
{
|
||||
public string? ConnectionString { get; set; }
|
||||
public string? DatabaseName { get; set; }
|
||||
@@ -31,7 +31,7 @@ public class AuditRecord
|
||||
public string Reason { get; set; }
|
||||
|
||||
[BsonElement("user_ip_address")]
|
||||
public string UserIpAddress { get; set; }
|
||||
public string? UserIpAddress { get; set; }
|
||||
|
||||
public class Change
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public class AuditRecordRepository : MongoRepository<AuditRecord>, IAuditRecordR
|
||||
{
|
||||
}
|
||||
|
||||
public AuditRecordRepository(IOptions<MongoDbSettings> dbSettings) : base(dbSettings)
|
||||
public AuditRecordRepository(IOptions<MongoDbSettingsAudit> dbSettings) : base(dbSettings)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public abstract class MongoRepository<T> : IMongoRepository<T>
|
||||
{
|
||||
protected readonly IMongoDatabase _db;
|
||||
|
||||
protected MongoRepository(IOptions<MongoDbSettings> dbSettings)
|
||||
protected MongoRepository(IOptions<MongoDbSettingsAudit> dbSettings)
|
||||
{
|
||||
_db = MongoDbHostBuilderExtension.GetMongoDB(dbSettings);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
namespace audit_logs.Services;
|
||||
|
||||
using System.Security.Claims;
|
||||
using System.Text.RegularExpressions;
|
||||
using audit_logs.Models;
|
||||
@@ -6,9 +8,6 @@ using audit_logs.Models.DTO;
|
||||
using audit_logs.Services.Interfaces;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MongoDB.Bson;
|
||||
|
||||
namespace audit_logs.Services;
|
||||
|
||||
using audit_logs.Repositories;
|
||||
using MongoDB.Driver;
|
||||
using audit_logs.Utils;
|
||||
@@ -32,82 +31,122 @@ public class AuditService : IAuditService
|
||||
{
|
||||
_auditLogRepository = new AuditRecordRepository(database);
|
||||
}
|
||||
public AuditService(IOptions<MongoDbSettings> dbSettings)
|
||||
|
||||
public AuditService(IOptions<MongoDbSettingsAudit> dbSettings)
|
||||
{
|
||||
_auditLogRepository = new AuditRecordRepository(dbSettings);
|
||||
}
|
||||
|
||||
|
||||
public IAuditRecordRepository AuditLogRepository => _auditLogRepository;
|
||||
|
||||
/// <summary>
|
||||
/// Records a detailed audit log entry.
|
||||
/// </summary>
|
||||
/// <param name="auditLogData">The data required to create an audit record.</param>
|
||||
public async Task RecordAuditAsync(AuditRecord auditLogData)
|
||||
/// <param name="auditRecord">The data required to create an audit record.</param>
|
||||
public async Task RecordAuditAsync(AuditRecord auditRecord)
|
||||
{
|
||||
if (auditLogData == null) throw new ArgumentNullException(nameof(auditLogData));
|
||||
if (string.IsNullOrWhiteSpace(auditLogData.EntityType))
|
||||
throw new ArgumentNullException(nameof(auditLogData.EntityType));
|
||||
if (string.IsNullOrWhiteSpace(auditLogData.RecordId))
|
||||
throw new ArgumentNullException(nameof(auditLogData.RecordId));
|
||||
if (string.IsNullOrWhiteSpace(auditLogData.UserId))
|
||||
throw new ArgumentNullException(nameof(auditLogData.UserId));
|
||||
if (string.IsNullOrWhiteSpace(auditLogData.ActionType))
|
||||
throw new ArgumentNullException(nameof(auditLogData.ActionType));
|
||||
if (auditLogData.Changes == null) throw new ArgumentNullException(nameof(auditLogData.Changes));
|
||||
if (string.IsNullOrWhiteSpace(auditLogData.UserIpAddress))
|
||||
throw new ArgumentNullException(nameof(auditLogData.UserIpAddress));
|
||||
|
||||
var auditRecord = new AuditRecord
|
||||
{
|
||||
EntityType = auditLogData.EntityType,
|
||||
RecordId = auditLogData.RecordId,
|
||||
UserId = auditLogData.UserId,
|
||||
ActionType = auditLogData.ActionType,
|
||||
ActionTime = auditLogData.ActionTime,
|
||||
Changes = auditLogData.Changes,
|
||||
Reason = auditLogData.Reason,
|
||||
UserIpAddress = auditLogData.UserIpAddress,
|
||||
};
|
||||
if (auditRecord == null) throw new ArgumentNullException(nameof(auditRecord));
|
||||
if (string.IsNullOrWhiteSpace(auditRecord.EntityType))
|
||||
throw new ArgumentNullException(nameof(auditRecord.EntityType));
|
||||
if (string.IsNullOrWhiteSpace(auditRecord.RecordId))
|
||||
throw new ArgumentNullException(nameof(auditRecord.RecordId));
|
||||
if (string.IsNullOrWhiteSpace(auditRecord.UserId))
|
||||
throw new ArgumentNullException(nameof(auditRecord.UserId));
|
||||
if (string.IsNullOrWhiteSpace(auditRecord.ActionType))
|
||||
throw new ArgumentNullException(nameof(auditRecord.ActionType));
|
||||
if (auditRecord.Changes == null) throw new ArgumentNullException(nameof(auditRecord.Changes));
|
||||
if (string.IsNullOrWhiteSpace(auditRecord.UserIpAddress))
|
||||
throw new ArgumentNullException(nameof(auditRecord.UserIpAddress));
|
||||
|
||||
await _auditLogRepository.InsertOneAsync(auditRecord);
|
||||
}
|
||||
|
||||
#region Documentacioòn para el metodo CreateAuditLogAsync
|
||||
|
||||
/// <summary>
|
||||
/// Creates an audit log record based on the provided original and modified data.
|
||||
/// This method generates an <see cref="AuditRecord"/> object to encapsulate all necessary details for the audit log entry.
|
||||
/// The <see cref="AuditRecord"/> includes the following fields:
|
||||
/// - <c>EntityType</c>: The type of entity being modified.
|
||||
/// - <c>RecordId</c>: The unique identifier of the record being modified within the EntityType.
|
||||
/// - <c>UserId</c>: The ID of the user performing the action.
|
||||
/// - <c>ActionType</c>: The type of action performed ("create", "update", or "delete").
|
||||
/// - <c>Reason</c>: (Optional) The reason for the action.
|
||||
/// - <c>ActionTime</c>: The timestamp of the action.
|
||||
/// - <c>Changes</c>: A list of differences between the original and modified data.
|
||||
/// - <c>UserIpAddress</c>: The IP address of the user.
|
||||
/// </summary>
|
||||
/// <param name="user">The <see cref="ClaimsPrincipal"/> representing the user performing the action. This parameter is required.</param>
|
||||
/// <param name="dataOriginal">The original object before the change, or null for new records.</param>
|
||||
/// <param name="dataModified">The modified object after the change, or null for deleted records.</param>
|
||||
/// <param name="user">
|
||||
/// The <see cref="ClaimsPrincipal"/> representing the user performing the action.
|
||||
/// This parameter is required and is used to populate the <c>UserId</c> and optionally other user-related fields.
|
||||
/// </param>
|
||||
/// <param name="dataOriginal">
|
||||
/// The original object before the change. This parameter can be null for new records (when <c>ActionType</c> is "create").
|
||||
/// </param>
|
||||
/// <param name="dataModified">
|
||||
/// The modified object after the change. This parameter can be null for deleted records (when <c>ActionType</c> is "delete").
|
||||
/// </param>
|
||||
/// <param name="reason">
|
||||
/// The reason for the change. If null or empty, defaults to "Not specified".
|
||||
/// The reason for the change. This parameter is optional; if null or empty, it defaults to "Not specified".
|
||||
/// </param>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// Thrown if <paramref name="user"/> is null.
|
||||
/// </exception>
|
||||
/// <remarks>
|
||||
/// This method constructs and populates an <see cref="AuditRecord"/> object to store all details related to the audit event.
|
||||
/// It then asynchronously saves the record using <c>RecordAuditAsync</c>.
|
||||
/// This method constructs and populates an <see cref="AuditRecord"/> object that contains the following fields:
|
||||
/// <list type="bullet">
|
||||
/// <item>
|
||||
/// <description><c>EntityType</c>: The type of entity being audited (e.g., "Patient").</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>RecordId</c>: The unique identifier of the record being modified within the entity (e.g. patient.id, nhc,etc) <c>EntityType</c>.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>UserId</c>: The ID of the user who performed the action that triggered the audit entry.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>ActionType</c>: The type of action performed, which can be one of the following:
|
||||
/// <list type="bullet">
|
||||
/// <item><description><c>"create"</c>: Indicates a new record was created.</description></item>
|
||||
/// <item><description><c>"update"</c>: Indicates an existing record was updated.</description></item>
|
||||
/// <item><description><c>"delete"</c>: Indicates a record was removed.</description></item>
|
||||
/// </list>
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>Reason</c>: (Optional) A description or justification for the action being logged.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>ActionTime</c>: The timestamp of when the action occurred, represented in UTC.</description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>Changes</c>: A list detailing the differences between the original and modified data. Each change includes:
|
||||
/// <list type="bullet">
|
||||
/// <item><description><c>Field</c>: The name of the field that was changed.</description></item>
|
||||
/// <item><description><c>OldValue</c>: The value of the field before the change.</description></item>
|
||||
/// <item><description><c>NewValue</c>: The value of the field after the change.</description></item>
|
||||
/// <item><description><c>ValueType</c>: The data type of the field (e.g., "string", "int", "bool").</description></item>
|
||||
/// </list>
|
||||
/// </description>
|
||||
/// </item>
|
||||
/// <item>
|
||||
/// <description><c>UserIpAddress</c>: (Optional) The IP address of the user performing the action. Useful for tracking location-based information.</description>
|
||||
/// </item>
|
||||
/// </list>
|
||||
/// Once the <see cref="AuditRecord"/> is constructed, it is asynchronously saved using <c>RecordAuditAsync</c>.
|
||||
/// </remarks>
|
||||
/// <returns>
|
||||
/// A task representing the asynchronous operation of recording the audit log.
|
||||
/// A task representing the asynchronous operation of recording the audit log. The task completes when the audit record is successfully stored.
|
||||
/// </returns>
|
||||
/// <example>
|
||||
/// Here is an example of how to use this method:
|
||||
/// <code>
|
||||
/// await CreateAuditLogAsync(
|
||||
/// user: HttpContext.User,
|
||||
/// dataOriginal: oldData,
|
||||
/// dataModified: newData,
|
||||
/// reason: "Updated user details"
|
||||
/// );
|
||||
/// </code>
|
||||
/// </example>
|
||||
#endregion
|
||||
|
||||
public async Task CreateAuditLogAsync(ClaimsPrincipal user, Object? dataOriginal, Object? dataModified,
|
||||
string? reason)
|
||||
{
|
||||
//auditLogData.ActionType falta este atributo
|
||||
if (user == null) throw new ArgumentNullException(nameof(user));
|
||||
|
||||
AuditRecord auditLogData = new AuditRecord();
|
||||
JsonComparer jsonComparer = new();
|
||||
if (dataOriginal != null)
|
||||
@@ -139,10 +178,10 @@ public class AuditService : IAuditService
|
||||
auditLogData.Reason = string.IsNullOrEmpty(reason) ? "Not specified" : reason;
|
||||
auditLogData.UserIpAddress = string.IsNullOrEmpty(user.FindFirst("IpAddress")?.Value)
|
||||
? "Not specified"
|
||||
: user.FindFirst("IpAddress")?.Value;
|
||||
auditLogData.UserId = user.FindFirst(ClaimTypes.Name)?.Value;
|
||||
: user.FindFirst("IpAddress")?.Value ?? "Not specified";
|
||||
auditLogData.UserId = user.FindFirst(ClaimTypes.Name)?.Value ?? "Not specified";
|
||||
|
||||
// Asignar ActionType según las condiciones
|
||||
// Asignar ActionType segun las condiciones
|
||||
if (dataOriginal == null || string.IsNullOrEmpty(dataOriginal.ToString()))
|
||||
{
|
||||
auditLogData.ActionType = "create";
|
||||
@@ -209,11 +248,14 @@ public class AuditService : IAuditService
|
||||
public async Task<PaginatedLogsResultDto<AuditRecordDto>> GetAuditLogsBySpecificFilterAsync(
|
||||
SpecificAuditLogFilterDto filterDto)
|
||||
{
|
||||
if (filterDto.pageNumber <= 0) throw new ArgumentException("Page number must be greater than 0.", nameof(filterDto.pageNumber));
|
||||
if (filterDto.pageSize <= 0) throw new ArgumentException("Page size must be greater than 0.", nameof(filterDto.pageSize));
|
||||
if (filterDto.pageNumber <= 0)
|
||||
throw new ArgumentException("Page number must be greater than 0.", nameof(filterDto.pageNumber));
|
||||
if (filterDto.pageSize <= 0)
|
||||
throw new ArgumentException("Page size must be greater than 0.", nameof(filterDto.pageSize));
|
||||
|
||||
// Construir filtro dinámico
|
||||
var filter = BuildAuditLogFilter(filterDto.userId, filterDto.recordId, filterDto.entityType, filterDto.startDate, filterDto.endDate);
|
||||
var filter = BuildAuditLogFilter(filterDto.userId, filterDto.recordId, filterDto.entityType,
|
||||
filterDto.startDate, filterDto.endDate);
|
||||
|
||||
var totalRecords = await _auditLogRepository.CountDocumentsAsync(filter);
|
||||
var totalPages = (int)Math.Ceiling((double)totalRecords / filterDto.pageSize);
|
||||
@@ -241,16 +283,20 @@ public class AuditService : IAuditService
|
||||
/// <param name="filtertTextOrDateDto.endDate">filter by the date the modification was made.</param>
|
||||
/// <returns>A paginated list of audit records.</returns>
|
||||
public async Task<PaginatedLogsResultDto<AuditRecordDto>> GetAuditLogsMatchingTextOrDateAsync(
|
||||
AuditLogTextOrDateSearchDTO filtertTextOrDateDto)
|
||||
AuditLogTextOrDateSearchDTO filtertTextOrDateDto)
|
||||
{
|
||||
if (filtertTextOrDateDto.pageNumber <= 0) throw new ArgumentException("Page number must be greater than 0.", nameof(filtertTextOrDateDto.pageNumber));
|
||||
if (filtertTextOrDateDto.pageSize <= 0) throw new ArgumentException("Page size must be greater than 0.", nameof(filtertTextOrDateDto.pageSize));
|
||||
if (filtertTextOrDateDto.pageNumber <= 0)
|
||||
throw new ArgumentException("Page number must be greater than 0.", nameof(filtertTextOrDateDto.pageNumber));
|
||||
if (filtertTextOrDateDto.pageSize <= 0)
|
||||
throw new ArgumentException("Page size must be greater than 0.", nameof(filtertTextOrDateDto.pageSize));
|
||||
|
||||
// Construct the text search filter if text_to_search is provided
|
||||
FilterDefinition<AuditRecord> filter;
|
||||
if (!string.IsNullOrWhiteSpace(filtertTextOrDateDto.searchText) || filtertTextOrDateDto.startDate.HasValue || filtertTextOrDateDto.endDate.HasValue)
|
||||
if (!string.IsNullOrWhiteSpace(filtertTextOrDateDto.searchText) || filtertTextOrDateDto.startDate.HasValue ||
|
||||
filtertTextOrDateDto.endDate.HasValue)
|
||||
{
|
||||
filter = BuildAuditLogFilterByText(filtertTextOrDateDto.searchText,filtertTextOrDateDto.startDate, filtertTextOrDateDto.endDate);
|
||||
filter = BuildAuditLogFilterByText(filtertTextOrDateDto.searchText, filtertTextOrDateDto.startDate,
|
||||
filtertTextOrDateDto.endDate);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -259,7 +305,8 @@ public class AuditService : IAuditService
|
||||
|
||||
var totalRecords = await _auditLogRepository.CountDocumentsAsync(filter);
|
||||
var totalPages = (int)Math.Ceiling((double)totalRecords / filtertTextOrDateDto.pageSize);
|
||||
var records = await _auditLogRepository.GetPaginatedAsync(filtertTextOrDateDto.pageNumber, filtertTextOrDateDto.pageSize, filter);
|
||||
var records = await _auditLogRepository.GetPaginatedAsync(filtertTextOrDateDto.pageNumber,
|
||||
filtertTextOrDateDto.pageSize, filter);
|
||||
var recordsDto = records.Select(record => AuditRecordMapper.ToDto(record)).ToList();
|
||||
|
||||
return new PaginatedLogsResultDto<AuditRecordDto>
|
||||
@@ -312,7 +359,6 @@ public class AuditService : IAuditService
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static FilterDefinition<AuditRecord> BuildAuditLogFilterByText(
|
||||
string? searchText,
|
||||
DateTime? startDate = null,
|
||||
@@ -358,8 +404,4 @@ public class AuditService : IAuditService
|
||||
|
||||
return builder.Empty; // Sin filtros, devuelve todos los documentos
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using audit_logs.Models;
|
||||
using MongoDB.Bson;
|
||||
public interface IAuditService
|
||||
{
|
||||
Task RecordAuditAsync(AuditRecord auditLogData);
|
||||
Task RecordAuditAsync(AuditRecord auditRecord);
|
||||
Task CreateAuditLogAsync(ClaimsPrincipal user, object dataOriginal, object dataModified, string reason = null);
|
||||
Task CreateAuditLogAsync(AuditLogData auditLogData);
|
||||
Task<PaginatedLogsResultDto<AuditRecordDto>> GetAuditLogsBySpecificFilterAsync(
|
||||
|
||||
@@ -26,12 +26,12 @@ public static class MongoDbHostBuilderExtension
|
||||
|
||||
return hostBuilder;
|
||||
}
|
||||
public static IMongoDatabase GetMongoDB(IOptions<MongoDbSettings> dbSettings)
|
||||
public static IMongoDatabase GetMongoDB(IOptions<MongoDbSettingsAudit> dbSettings)
|
||||
{
|
||||
_mongoDb ??= ConfigureMongoDbConnection(dbSettings);
|
||||
return _mongoDb;
|
||||
}
|
||||
private static IMongoDatabase ConfigureMongoDbConnection(IOptions<MongoDbSettings> dbSettings)
|
||||
private static IMongoDatabase ConfigureMongoDbConnection(IOptions<MongoDbSettingsAudit> dbSettings)
|
||||
{
|
||||
var connectionString = dbSettings.Value.ConnectionString;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<!-- Informacion para NuGet -->
|
||||
<PackageId>AuditLogs</PackageId>
|
||||
<Version>1.0.17</Version>
|
||||
<Version>1.0.19</Version>
|
||||
<Authors>Epigram</Authors>
|
||||
<Company>Epigram</Company>
|
||||
<Description>Library for recording audit logs using MongoDB.</Description>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"audit-logs/1.0.17": {
|
||||
"audit-logs/1.0.19": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Hosting": "8.0.0",
|
||||
"MongoDB.Driver": "2.23.1",
|
||||
@@ -569,7 +569,7 @@
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"audit-logs/1.0.17": {
|
||||
"audit-logs/1.0.19": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,11 +13,11 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Epigram")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyDescriptionAttribute("Library for recording audit logs using MongoDB.")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.17.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.17+8c3be106f93e44ea3daffe2267723e4026a0569d")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.19.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.19+7c08e6e218b786bd1ac8663615a55b7a1bbd429a")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("audit-logs")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("audit-logs")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.17.0")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.19.0")]
|
||||
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://git.teralevel.io/jrojas/audit/src/branch/master/audit-logs")]
|
||||
|
||||
// Generado por la clase WriteCodeFragment de MSBuild.
|
||||
|
||||
@@ -1 +1 @@
|
||||
320b6d684f74b89619de8f730502db744f8cdec76db8b9368a26a05e0f551580
|
||||
88955e77972330336b26e79f5f072c1699f7c7a6c645f80e4ccc5579a9275d67
|
||||
|
||||
@@ -1 +1 @@
|
||||
fee74b0a3f2ed58887d58c89fb59bc5939f2abe98f34889b8fcfd273ddc62914
|
||||
f5c69936e6460786b672de95895cf942c7281cfa292c2cd886ce7c819e5725c4
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"projects": {
|
||||
"/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj": {
|
||||
"version": "1.0.16",
|
||||
"version": "1.0.17",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
|
||||
"projectName": "AuditLogs",
|
||||
|
||||
@@ -2567,7 +2567,7 @@
|
||||
"/home/julian/.nuget/packages/": {}
|
||||
},
|
||||
"project": {
|
||||
"version": "1.0.16",
|
||||
"version": "1.0.17",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
|
||||
"projectName": "AuditLogs",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "Et3G5FTIc/k=",
|
||||
"dgSpecHash": "dTEHYGtSsoE=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
|
||||
"expectedPackageFiles": [
|
||||
|
||||
@@ -1 +1 @@
|
||||
17322799320339764
|
||||
17326086729278728
|
||||
@@ -1 +1 @@
|
||||
17326086729278728
|
||||
17326358893202983
|
||||
@@ -28,7 +28,7 @@ public class AuditServiceFilterbyTextAndDateTests
|
||||
var allRecords = await _service.AuditLogRepository.GetAllAuditRecordsAsync();
|
||||
|
||||
// Assert
|
||||
Assert.That(allRecords.Count(), Is.EqualTo(5), "All records from the JSON file should be loaded.");
|
||||
Assert.That(allRecords.Count(), Is.EqualTo(7), "All records from the JSON file should be loaded.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -8,7 +8,7 @@
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"audit-test/1.0.0": {
|
||||
"dependencies": {
|
||||
"AuditLogs": "1.0.16",
|
||||
"AuditLogs": "1.0.17",
|
||||
"Microsoft.Extensions.Hosting": "8.0.0",
|
||||
"Microsoft.NET.Test.Sdk": "17.8.0",
|
||||
"Mongo2Go": "2.2.16",
|
||||
@@ -18,7 +18,7 @@
|
||||
"NUnit3TestAdapter": "4.5.0",
|
||||
"coverlet.collector": "6.0.0",
|
||||
"xunit": "2.9.2",
|
||||
"audit-logs": "1.0.16.0"
|
||||
"audit-logs": "1.0.18.0"
|
||||
},
|
||||
"runtime": {
|
||||
"audit-test.dll": {}
|
||||
@@ -944,7 +944,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"AuditLogs/1.0.16": {
|
||||
"AuditLogs/1.0.17": {
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Hosting": "8.0.0",
|
||||
"MongoDB.Driver": "2.23.1",
|
||||
@@ -953,16 +953,16 @@
|
||||
},
|
||||
"runtime": {
|
||||
"audit-logs.dll": {
|
||||
"assemblyVersion": "1.0.16",
|
||||
"fileVersion": "1.0.16.0"
|
||||
"assemblyVersion": "1.0.17",
|
||||
"fileVersion": "1.0.18.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"audit-logs/1.0.16.0": {
|
||||
"audit-logs/1.0.18.0": {
|
||||
"runtime": {
|
||||
"audit-logs.dll": {
|
||||
"assemblyVersion": "1.0.16.0",
|
||||
"fileVersion": "1.0.16.0"
|
||||
"assemblyVersion": "1.0.18.0",
|
||||
"fileVersion": "1.0.18.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1471,12 +1471,12 @@
|
||||
"path": "zstdsharp.port/0.7.3",
|
||||
"hashPath": "zstdsharp.port.0.7.3.nupkg.sha512"
|
||||
},
|
||||
"AuditLogs/1.0.16": {
|
||||
"AuditLogs/1.0.17": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"audit-logs/1.0.16.0": {
|
||||
"audit-logs/1.0.18.0": {
|
||||
"type": "reference",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("audit-test")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8c3be106f93e44ea3daffe2267723e4026a0569d")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7c08e6e218b786bd1ac8663615a55b7a1bbd429a")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("audit-test")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("audit-test")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
142b1c1378f32e83f6fc5414661e98a2b515d2f45db3470d3ed86426c2d17e64
|
||||
beadb3471c102aa4f942699573b0c6b6cc2905637a4cf47b218f532af9de08f7
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"projects": {
|
||||
"/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj": {
|
||||
"version": "1.0.16",
|
||||
"version": "1.0.17",
|
||||
"restore": {
|
||||
"projectUniqueName": "/home/julian/Documentos/repos/audit/audit-logs/audit-logs/audit-logs.csproj",
|
||||
"projectName": "AuditLogs",
|
||||
|
||||
@@ -1448,7 +1448,7 @@
|
||||
"lib/net7.0/ZstdSharp.dll": {}
|
||||
}
|
||||
},
|
||||
"AuditLogs/1.0.16": {
|
||||
"AuditLogs/1.0.17": {
|
||||
"type": "project",
|
||||
"framework": ".NETCoreApp,Version=v8.0",
|
||||
"dependencies": {
|
||||
@@ -3799,7 +3799,7 @@
|
||||
"zstdsharp.port.nuspec"
|
||||
]
|
||||
},
|
||||
"AuditLogs/1.0.16": {
|
||||
"AuditLogs/1.0.17": {
|
||||
"type": "project",
|
||||
"path": "../audit-logs/audit-logs.csproj",
|
||||
"msbuildProject": "../audit-logs/audit-logs.csproj"
|
||||
@@ -3807,7 +3807,7 @@
|
||||
},
|
||||
"projectFileDependencyGroups": {
|
||||
"net8.0": [
|
||||
"AuditLogs >= 1.0.16",
|
||||
"AuditLogs >= 1.0.17",
|
||||
"Microsoft.Extensions.Hosting >= 8.0.0",
|
||||
"Microsoft.NET.Test.Sdk >= 17.8.0",
|
||||
"Mongo2Go >= 2.2.16",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": 2,
|
||||
"dgSpecHash": "7Jhsnyq0q5Y=",
|
||||
"dgSpecHash": "f3yoSH3jMzc=",
|
||||
"success": true,
|
||||
"projectFilePath": "/home/julian/Documentos/repos/audit/audit-logs/audit-test/audit-test.csproj",
|
||||
"expectedPackageFiles": [
|
||||
@@ -75,7 +75,7 @@
|
||||
"/home/julian/.nuget/packages/xunit.extensibility.core/2.9.2/xunit.extensibility.core.2.9.2.nupkg.sha512",
|
||||
"/home/julian/.nuget/packages/xunit.extensibility.execution/2.9.2/xunit.extensibility.execution.2.9.2.nupkg.sha512",
|
||||
"/home/julian/.nuget/packages/zstdsharp.port/0.7.3/zstdsharp.port.0.7.3.nupkg.sha512",
|
||||
"/home/julian/.nuget/packages/auditlogs/1.0.16/auditlogs.1.0.16.nupkg.sha512"
|
||||
"/home/julian/.nuget/packages/auditlogs/1.0.17/auditlogs.1.0.17.nupkg.sha512"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
17322799320379764
|
||||
17326086729278728
|
||||
@@ -1 +1 @@
|
||||
17326086729278728
|
||||
17326358893202983
|
||||
Reference in New Issue
Block a user