class
DiscoverHandlersAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class DiscoverHandlersAttribute : Attribute
Inherits: Attribute
Specifies a marker type whose containing assembly is scanned at compile time for mediator handlers and behaviors.
Members (2)
constructorDiscoverHandlersAttribute
public DiscoverHandlersAttribute(Type assemblyMarkerType)
Initializes a new instance of the `DiscoverHandlersAttribute` class with the specified assembly marker type.
- assemblyMarkerType: Type
- A marker type located in the target assembly to scan for handlers.
propertyAssemblyMarkerType
public Type AssemblyMarkerType { get; }
Gets the marker type whose containing assembly is scanned.
enum
HandlerLifetime
Assembly: EricksonLopez.Mediatorpublic enum HandlerLifetime
Specifies the lifetime of a handler registration within the dependency injection container.
Members (3)
fieldScoped
Scoped
Specifies that a new instance of the handler is created per service scope.
fieldSingleton
Singleton
Specifies that a single instance of the handler is created and shared across all requests.
fieldTransient
Transient
Specifies that a new instance of the handler is created each time it is requested.
interface
ICommandHandler<TCommand, TResponse>
Assembly: EricksonLopez.Mediatorpublic interface ICommandHandler<TCommand, TResponse> where TCommand : ICommand<TResponse>
Defines a handler for processing a command of type `TCommand`.
Members (1)
methodHandle
ValueTask<TResponse> Handle(TCommand command, CancellationToken cancellationToken)
Processes the specified command.
- command: TCommand
- The command instance to process.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response produced by the command.
interface
ICommand<TResponse>
Assembly: EricksonLopez.Mediatorpublic interface ICommand<TResponse>
Defines a command that produces a response of type `TResponse`.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
IMediator
Assembly: EricksonLopez.Mediatorpublic interface IMediator : ISender, IPublisher
Implements: IPublisher, ISender
Defines a mediator that combines message dispatching and notification publishing capabilities.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
INext
Assembly: EricksonLopez.Mediatorpublic interface INext
Defines a callback delegate representing the next step in a notification processing pipeline.
interface
INext<TResponse>
Assembly: EricksonLopez.Mediatorpublic interface INext<TResponse>
Defines a callback delegate representing the next step in a request processing pipeline.
Members (1)
methodInvokeAsync
ValueTask<TResponse> InvokeAsync()
Invokes the next behavior or handler in the pipeline.
Returns: A value task representing the asynchronous operation that yields the response from subsequent pipeline components.
interface
INotification
Assembly: EricksonLopez.Mediatorpublic interface INotification
Defines a message that represents an event to be published to zero or more handlers.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
INotificationBehavior<TNotification>
Assembly: EricksonLopez.Mediatorpublic interface INotificationBehavior<TNotification> where TNotification : INotification
Defines a cross-cutting behavior that surrounds notification handling within the mediator pipeline.
Members (1)
methodHandle<TNext>
ValueTask Handle<TNext>(TNotification notification, TNext next, CancellationToken cancellationToken) where TNext : struct, INext
Intercepts the notification publishing pipeline and invokes the next step.
- notification: TNotification
- The notification instance being processed.
- next: TNext
- The pipeline continuation delegate to invoke downstream behaviors or handlers.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation.
interface
INotificationHandler<TNotification>
Assembly: EricksonLopez.Mediatorpublic interface INotificationHandler<TNotification> where TNotification : INotification
Defines a handler for processing notifications of type `TNotification`.
Members (1)
methodHandle
ValueTask Handle(TNotification notification, CancellationToken cancellationToken)
Processes the specified notification.
- notification: TNotification
- The notification instance to process.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation.
interface
IPipelineBehavior<TRequest, TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IPipelineBehavior<TRequest, TResponse>
Defines a cross-cutting behavior that intercepts request processing within the mediator pipeline.
Members (1)
methodHandle<TNext>
ValueTask<TResponse> Handle<TNext>(TRequest request, TNext next, CancellationToken cancellationToken) where TNext : struct, INext<TResponse>
Intercepts the request execution pipeline and invokes the next step.
- request: TRequest
- The request instance being processed.
- next: TNext
- The pipeline continuation delegate to invoke downstream behaviors or the handler.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the pipeline.
interface
IPublisher
Assembly: EricksonLopez.Mediatorpublic interface IPublisher
Defines a mechanism for publishing notification messages to registered handlers.
Members (1)
methodPublish<TNotification>
ValueTask Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification
Publishes the specified notification to all registered handlers.
- notification: TNotification
- The notification instance to publish.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation.
interface
IQueryHandler<TQuery, TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IQueryHandler<TQuery, TResponse> where TQuery : IQuery<TResponse>
Defines a handler for processing queries of type `TQuery`.
Members (1)
methodHandle
ValueTask<TResponse> Handle(TQuery query, CancellationToken cancellationToken)
Processes the specified query.
- query: TQuery
- The query instance to process.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response produced by the query.
interface
IQuery<TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IQuery<TResponse>
Defines a query that produces a response of type `TResponse`.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
IRequest
Assembly: EricksonLopez.Mediatorpublic interface IRequest : IRequest<Unit>
Implements: IRequest<Unit>
Defines a marker interface for a request that produces a response of type `Unit`. Provided for migration compatibility with MediatR.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
IRequestHandler<TRequest>
Assembly: EricksonLopez.Mediatorpublic interface IRequestHandler<TRequest> : IRequestHandler<TRequest, Unit> where TRequest : IRequest<Unit>
Implements: IRequestHandler<TRequest, Unit>
Defines a handler for processing a request of type `TRequest` that produces a response of type `Unit`. Provided for migration compatibility with MediatR.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
IRequestHandler<TRequest, TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IRequestHandler<TRequest, TResponse>
Defines a handler for processing a request of type `TRequest` that produces a response of type `TResponse`. Provided for migration compatibility with MediatR.
Members (1)
methodHandle
ValueTask<TResponse> Handle(TRequest request, CancellationToken cancellationToken)
Processes the specified request.
- request: TRequest
- The request instance to process.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response produced by the request.
interface
IRequest<TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IRequest<TResponse> : ICommand<TResponse>
Implements: ICommand<TResponse>
Defines a marker interface for a request that produces a response of type `TResponse`. Provided for migration compatibility with MediatR; prefer `ICommand<TResponse>` or `IQuery<TResponse>` in new code.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
interface
ISender
Assembly: EricksonLopez.Mediatorpublic interface ISender
Defines a mechanism for dispatching commands, queries, and stream requests to their respective handlers.
Members (5)
methodCreateStream<TResponse>
IAsyncEnumerable<TResponse> CreateStream<TResponse>(IStreamRequest<TResponse> request, CancellationToken cancellationToken = default)
Dispatches a stream request to its registered handler and returns an asynchronous sequence of items.
- request: IStreamRequest<TResponse>
- The stream request instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the streaming operation.
Returns: An asynchronous stream yielding items of type `TResponse`.
methodSend<TResponse>
ValueTask<TResponse> Send<TResponse>(ICommand<TResponse> command, CancellationToken cancellationToken = default)
Dispatches a command to its registered handler.
- command: ICommand<TResponse>
- The command instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the handler.
methodSend<TResponse>
ValueTask<TResponse> Send<TResponse>(IQuery<TResponse> query, CancellationToken cancellationToken = default)
Dispatches a query to its registered handler.
- query: IQuery<TResponse>
- The query instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the handler.
methodSendCommand<TCommand, TResponse>
ValueTask<TResponse> SendCommand<TCommand, TResponse>(TCommand command, CancellationToken cancellationToken = default) where TCommand : ICommand<TResponse>
Dispatches a strongly typed command directly via generic static dispatch without boxing or runtime reflection.
- command: TCommand
- The command instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the handler.
methodSendQuery<TQuery, TResponse>
ValueTask<TResponse> SendQuery<TQuery, TResponse>(TQuery query, CancellationToken cancellationToken = default) where TQuery : IQuery<TResponse>
Dispatches a strongly typed query directly via generic static dispatch without boxing or runtime reflection.
- query: TQuery
- The query instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the handler.
interface
IStreamRequestHandler<TRequest, TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IStreamRequestHandler<TRequest, TResponse> where TRequest : IStreamRequest<TResponse>
Defines a handler for processing stream requests of type `TRequest`.
Members (1)
methodHandle
IAsyncEnumerable<TResponse> Handle(TRequest request, CancellationToken cancellationToken)
Processes the specified stream request and returns an asynchronous sequence of items.
- request: TRequest
- The stream request instance to process.
- cancellationToken: CancellationToken
- A token that can be used to cancel the streaming operation.
Returns: An asynchronous enumerable yielding elements of type `TResponse`.
interface
IStreamRequest<TResponse>
Assembly: EricksonLopez.Mediatorpublic interface IStreamRequest<TResponse>
Defines a request that yields an asynchronous stream of items of type `TResponse`.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).
class
MediatorHealthCheckExtensions
Assembly: EricksonLopez.Mediatorpublic static class MediatorHealthCheckExtensions
Provides extension methods for registering `MediatorHealthCheck` with dependency injection.
Members (1)
methodAddMediatorHealthCheck
public static IServiceCollection AddMediatorHealthCheck(this IServiceCollection services)
Registers `MediatorHealthCheck` with the specified service collection.
- services: this IServiceCollection
- The service collection to register the health check into.
Returns: The same service collection instance for method chaining.
class
MediatorRecursionException
Assembly: EricksonLopez.Mediatorpublic sealed class MediatorRecursionException : InvalidOperationException
Inherits: InvalidOperationException
Represents an exception thrown when mediator dispatch recursion exceeds the configured maximum depth limit (ELM014).
Members (6)
constructorMediatorRecursionException
public MediatorRecursionException(int maxDepth, int currentDepth, Type? requestType = null)
Initializes a new instance of the `MediatorRecursionException` class with recursion depth details.
- maxDepth: int
- The maximum allowed recursion depth.
- currentDepth: int
- The current recursion depth.
- requestType: Type?
- The type of the request being dispatched.
constructorMediatorRecursionException
public MediatorRecursionException(string message)
Initializes a new instance of the `MediatorRecursionException` class with a specified error message.
- message: string
- The message that describes the error.
constructorMediatorRecursionException
public MediatorRecursionException(string message, Exception innerException)
Initializes a new instance of the `MediatorRecursionException` class with a specified error message and inner exception.
- message: string
- The error message that explains the reason for the exception.
- innerException: Exception
- The exception that is the cause of the current exception.
propertyCurrentDepth
public int CurrentDepth { get; }
Gets the recursion depth observed when the threshold was exceeded.
propertyMaxDepth
public int MaxDepth { get; }
Gets the maximum allowed recursion depth.
propertyRequestType
public Type? RequestType { get; }
Gets the runtime type of the request being dispatched when recursion exceeded the threshold, if available.
class
MediatorValidationException
Assembly: EricksonLopez.Mediatorpublic sealed class MediatorValidationException : Exception
Inherits: Exception
Represents an exception thrown when request validation fails during pipeline execution.
Members (3)
constructorMediatorValidationException
public MediatorValidationException(IReadOnlyList<string> errors)
Initializes a new instance of the `MediatorValidationException` class with a collection of validation error messages.
- errors: IReadOnlyList<string>
- The collection of validation error messages.
constructorMediatorValidationException
public MediatorValidationException(string message)
Initializes a new instance of the `MediatorValidationException` class with a single validation error message.
- message: string
- The message that describes the validation error.
propertyErrors
public IReadOnlyList<string> Errors { get; }
Gets the collection of validation failure error messages.
class
NotificationHandlerAggregateException
Assembly: EricksonLopez.Mediatorpublic sealed class NotificationHandlerAggregateException : Exception
Inherits: Exception
Represents an aggregate exception containing exceptions thrown by notification handlers during a publish operation.
Members (2)
constructorNotificationHandlerAggregateException
public NotificationHandlerAggregateException(IReadOnlyList<Exception> exceptions)
Initializes a new instance of the `NotificationHandlerAggregateException` class with the specified handler exceptions.
- exceptions: IReadOnlyList<Exception>
- The collection of exceptions thrown during notification publishing.
propertyHandlerExceptions
public IReadOnlyList<Exception> HandlerExceptions { get; }
Gets the collection of exceptions thrown by individual notification handlers.
class
NotificationOrderAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class NotificationOrderAttribute : Attribute
Inherits: Attribute
Specifies the execution order of a notification handler relative to other handlers of the same notification type.
Members (2)
constructorNotificationOrderAttribute
public NotificationOrderAttribute(int order)
Initializes a new instance of the `NotificationOrderAttribute` class with the specified order.
- order: int
- The execution order value. Lower values execute earlier.
propertyOrder
public int Order { get; }
Gets the execution priority order for the decorated notification handler.
enum
PublishStrategy
Assembly: EricksonLopez.Mediatorpublic enum PublishStrategy
Specifies the dispatching strategy used when publishing notifications to multiple handlers.
Members (3)
fieldParallel
Parallel
Executes all registered notification handlers concurrently using `Task.WhenAll(Task[])`. In DI-managed pipelines, each handler is resolved within an isolated child `DependencyInjection.AsyncServiceScope` to prevent concurrent access collisions on shared scoped services.
fieldSequential
Sequential
Executes all registered notification handlers sequentially in registration order.
fieldSequentialAggregateExceptions
SequentialAggregateExceptions
Executes all handlers sequentially, catching failures and aggregating them into a `NotificationHandlerAggregateException`.
class
PublishStrategyAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class PublishStrategyAttribute : Attribute
Inherits: Attribute
Specifies the publishing strategy applied when dispatching the decorated notification type.
Members (2)
constructorPublishStrategyAttribute
public PublishStrategyAttribute(PublishStrategy strategy)
Initializes a new instance of the `PublishStrategyAttribute` class with the specified execution strategy.
- strategy: PublishStrategy
- The publishing strategy to apply to the notification.
propertyStrategy
public PublishStrategy Strategy { get; }
Gets the configured publishing strategy.
class
ServiceLifetimeAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ServiceLifetimeAttribute : Attribute
Inherits: Attribute
Specifies the service lifetime of the decorated handler within the dependency injection container.
Members (2)
constructorServiceLifetimeAttribute
public ServiceLifetimeAttribute(HandlerLifetime lifetime)
Initializes a new instance of the `ServiceLifetimeAttribute` class with the specified service lifetime.
- lifetime: HandlerLifetime
- The service lifetime to apply to the handler registration.
propertyLifetime
public HandlerLifetime Lifetime { get; }
Gets the configured lifetime for the handler registration.
class
StaticMediator
Assembly: EricksonLopez.Mediatorpublic static class StaticMediator
Provides static mediator dispatching capabilities without requiring a dependency injection container.
Members (9)
methodFreeze
public static void Freeze()
Freezes all handler registrations, rendering `StaticMediator` immutable. Once frozen, any subsequent call to registration methods will throw an `InvalidOperationException`.
methodPublish<TNotification>
public static async ValueTask Publish<TNotification>(TNotification notification, CancellationToken cancellationToken = default) where TNotification : INotification
Publishes a notification to all registered static handlers in registration order (FIFO).
- notification: TNotification
- The notification instance to publish.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation.
methodRegisterCommandHandler<TCommand, TResponse>
public static void RegisterCommandHandler<TCommand, TResponse>(ICommandHandler<TCommand, TResponse> handler) where TCommand : ICommand<TResponse>
Registers a command handler instance for static dispatching.
- handler: ICommandHandler<TCommand, TResponse>
- The command handler instance to register.
methodRegisterNotificationHandler<TNotification>
public static void RegisterNotificationHandler<TNotification>(INotificationHandler<TNotification> handler) where TNotification : INotification
Registers a notification handler instance for static dispatching.
- handler: INotificationHandler<TNotification>
- The notification handler instance to register.
methodRegisterQueryHandler<TQuery, TResponse>
public static void RegisterQueryHandler<TQuery, TResponse>(IQueryHandler<TQuery, TResponse> handler) where TQuery : IQuery<TResponse>
Registers a query handler instance for static dispatching.
- handler: IQueryHandler<TQuery, TResponse>
- The query handler instance to register.
methodReset
public static void Reset()
Removes all statically registered command, query, and notification handlers.
methodSendCommand<TCommand, TResponse>
public static ValueTask<TResponse> SendCommand<TCommand, TResponse>(TCommand command, CancellationToken cancellationToken = default) where TCommand : ICommand<TResponse>
Dispatches a strongly typed command directly to its registered static handler without reflection.
- command: TCommand
- The command instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the handler.
methodSendQuery<TQuery, TResponse>
public static ValueTask<TResponse> SendQuery<TQuery, TResponse>(TQuery query, CancellationToken cancellationToken = default) where TQuery : IQuery<TResponse>
Dispatches a strongly typed query directly to its registered static handler without reflection.
- query: TQuery
- The query instance to dispatch.
- cancellationToken: CancellationToken
- A token that can be used to cancel the operation.
Returns: A value task representing the asynchronous operation that yields the response from the handler.
propertyIsFrozen
public static bool IsFrozen { get; }
Gets a value indicating whether handler registrations in `StaticMediator` have been frozen.
struct
Unit
Assembly: EricksonLopez.Mediatorpublic readonly struct Unit : IEquatable<Unit>, IComparable<Unit>, IComparable
Implements: IComparable, IComparable<Unit>, IEquatable<Unit>
Represents a type with a single value, typically used to indicate the absence of a return value in generic signatures.
Members (12)
methodCompareTo
public int CompareTo(Unit other)
Inherits documentation from base type or interface.
- other: Unit
methodEquals
public override bool Equals(object? obj)
Inherits documentation from base type or interface.
- obj: object?
methodEquals
public bool Equals(Unit other)
Inherits documentation from base type or interface.
- other: Unit
methodGetHashCode
public override int GetHashCode()
Inherits documentation from base type or interface.
methodToString
public override string ToString()
Inherits documentation from base type or interface.
methodoperator !=
public static bool operator !=(Unit first, Unit second)
Determines whether two `Unit` values are not equal.
- first: Unit
- The first instance to compare.
- second: Unit
- The second instance to compare.
Returns: Always `false`.
methodoperator <
public static bool operator <(Unit left, Unit right)
Determines whether the first `Unit` is less than the second.
- left: Unit
- The first instance to compare.
- right: Unit
- The second instance to compare.
Returns: Always `false`.
methodoperator <=
public static bool operator <=(Unit left, Unit right)
Determines whether the first `Unit` is less than or equal to the second.
- left: Unit
- The first instance to compare.
- right: Unit
- The second instance to compare.
Returns: Always `true`.
methodoperator ==
public static bool operator ==(Unit first, Unit second)
Determines whether two `Unit` values are equal.
- first: Unit
- The first instance to compare.
- second: Unit
- The second instance to compare.
Returns: Always `true`.
methodoperator >
public static bool operator >(Unit left, Unit right)
Determines whether the first `Unit` is greater than the second.
- left: Unit
- The first instance to compare.
- right: Unit
- The second instance to compare.
Returns: Always `false`.
methodoperator >=
public static bool operator >=(Unit left, Unit right)
Determines whether the first `Unit` is greater than or equal to the second.
- left: Unit
- The first instance to compare.
- right: Unit
- The second instance to compare.
Returns: Always `true`.
propertyValue
public static ref readonly Unit Value { get; }
Gets the single `Unit` value.
class
UseBehaviorAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class UseBehaviorAttribute : Attribute
Inherits: Attribute
Specifies that a pipeline behavior applies to the decorated request type.
Members (3)
constructorUseBehaviorAttribute
public UseBehaviorAttribute(Type behaviorType, int order = 0)
Initializes a new instance of the `UseBehaviorAttribute` class with the specified behavior type and execution order.
- behaviorType: Type
- The type of the pipeline behavior.
- order: int
- The execution order relative to other behaviors. Lower values execute first.
propertyBehaviorType
public Type BehaviorType { get; }
Gets the type of the pipeline behavior to execute.
propertyOrder
public int Order { get; }
Gets the execution order of the behavior. Lower numbers run first.
class
UseGlobalBehaviorAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class UseGlobalBehaviorAttribute : Attribute
Inherits: Attribute
Specifies that a pipeline behavior applies globally to all requests across the assembly.
Members (3)
constructorUseGlobalBehaviorAttribute
public UseGlobalBehaviorAttribute(Type behaviorType, int order = 0)
Initializes a new instance of the `UseGlobalBehaviorAttribute` class with the specified behavior type and execution order.
- behaviorType: Type
- The type of the pipeline behavior.
- order: int
- The execution order relative to other behaviors. Lower values execute first.
propertyBehaviorType
public Type BehaviorType { get; }
Gets the type of the pipeline behavior to execute.
propertyOrder
public int Order { get; }
Gets the execution order of the behavior. Lower numbers run first.
class
ValidateLengthAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ValidateLengthAttribute : Attribute
Inherits: Attribute
Validates that the length of the decorated string falls within the specified bounds.
Members (4)
constructorValidateLengthAttribute
public ValidateLengthAttribute(int minimumLength, int maximumLength, string? errorMessage = null)
Initializes a new instance of the `ValidateLengthAttribute` class with the specified minimum and maximum lengths.
- minimumLength: int
- The minimum allowed character length.
- maximumLength: int
- The maximum allowed character length.
- errorMessage: string?
- The optional custom error message returned when validation fails.
propertyErrorMessage
public string? ErrorMessage { get; set; }
Gets or sets the custom error message returned when validation fails.
propertyMaximumLength
public int MaximumLength { get; }
Gets the maximum allowed character length.
propertyMinimumLength
public int MinimumLength { get; }
Gets the minimum allowed character length.
class
ValidateNotEmptyAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ValidateNotEmptyAttribute : Attribute
Inherits: Attribute
Validates that the decorated string, collection, or identifier is not empty.
Members (2)
constructorValidateNotEmptyAttribute
public ValidateNotEmptyAttribute(string? errorMessage = null)
Initializes a new instance of the `ValidateNotEmptyAttribute` class.
- errorMessage: string?
- The optional custom error message returned when validation fails.
propertyErrorMessage
public string? ErrorMessage { get; set; }
Gets or sets the custom error message returned when validation fails.
class
ValidateNotNullAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ValidateNotNullAttribute : Attribute
Inherits: Attribute
Validates that the decorated property is not `null`.
Members (2)
constructorValidateNotNullAttribute
public ValidateNotNullAttribute(string? errorMessage = null)
Initializes a new instance of the `ValidateNotNullAttribute` class.
- errorMessage: string?
- The optional custom error message returned when validation fails.
propertyErrorMessage
public string? ErrorMessage { get; set; }
Gets or sets the custom error message returned when validation fails.
class
ValidateRangeAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ValidateRangeAttribute : Attribute
Inherits: Attribute
Validates that the decorated numeric value falls within the specified range.
Members (4)
constructorValidateRangeAttribute
public ValidateRangeAttribute(double minimum, double maximum, string? errorMessage = null)
Initializes a new instance of the `ValidateRangeAttribute` class with the specified minimum and maximum bounds.
- minimum: double
- The minimum acceptable numeric value.
- maximum: double
- The maximum acceptable numeric value.
- errorMessage: string?
- The optional custom error message returned when validation fails.
propertyErrorMessage
public string? ErrorMessage { get; set; }
Gets or sets the custom error message returned when validation fails.
propertyMaximum
public double Maximum { get; }
Gets the maximum acceptable numeric value.
propertyMinimum
public double Minimum { get; }
Gets the minimum acceptable numeric value.
class
ValidateRegexAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ValidateRegexAttribute : Attribute
Inherits: Attribute
Validates that the decorated string matches the specified regular expression pattern.
Members (3)
constructorValidateRegexAttribute
public ValidateRegexAttribute(string pattern, string? errorMessage = null)
Initializes a new instance of the `ValidateRegexAttribute` class with the specified pattern.
- pattern: string
- The regular expression pattern used for validation.
- errorMessage: string?
- The optional custom error message returned when validation fails.
propertyErrorMessage
public string? ErrorMessage { get; set; }
Gets or sets the custom error message returned when validation fails.
propertyPattern
public string Pattern { get; }
Gets the regular expression pattern for validation.
class
ValidateRequestAttribute
Assembly: EricksonLopez.Mediatorpublic sealed class ValidateRequestAttribute : Attribute
Inherits: Attribute
Enables compile-time validation code generation for the decorated request type.
Members (0)
This type declares 0 public members (e.g. marker interface or empty enum/record).