mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 19:21:10 +00:00
Adds telemetry instrumentation to application handlers
This commit is contained in:
1 parent
ffcb25c13f
commit
a2c99b1b79
13 files changed
+862
-2
No files matched your search
+33
@@ -0,0 +1,33 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.LibraryAggregate;
|
||||
using Lumina.Domain.Core.BoundedContexts.LibraryManagementBoundedContext.LibraryAggregate.Events;
|
||||
using Lumina.Domain.Fixtures.Core.BoundedContexts.LibraryManagementBoundedContext.LibraryAggregate;
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Domain.Fixtures.Core.BoundedContexts.LibraryManagementBoundedContext.LibraryAggregate.Events;
|
||||
|
||||
/// <summary>
|
||||
/// Fixture class for the <see cref="LibrarySavedDomainEvent"/> record.
|
||||
/// </summary>
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class LibrarySavedDomainEventFixture
|
||||
{
|
||||
private readonly LibraryFixture _libraryFixture = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="LibrarySavedDomainEvent"/>.
|
||||
/// </summary>
|
||||
/// <param name="id">Optional. The Id of the domain event.</param>
|
||||
/// <param name="library">Optional. The library that was created or updated.</param>
|
||||
/// <param name="occurredOnUtc">Optional. The date and time when the domain event occurred.</param>
|
||||
/// <returns>The created <see cref="LibrarySavedDomainEvent"/>.</returns>
|
||||
public LibrarySavedDomainEvent Create(Guid? id = null, Library? library = null, DateTime? occurredOnUtc = null)
|
||||
{
|
||||
return new LibrarySavedDomainEvent(
|
||||
id ?? Guid.NewGuid(),
|
||||
library ?? _libraryFixture.Create(),
|
||||
occurredOnUtc ?? DateTime.UtcNow);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user