31 lines
875 B
C#
31 lines
875 B
C#
using xCommons.Extensions;
|
|
using xExceptions.Constants;
|
|
using xEventService.Extensions;
|
|
using xEventService.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace xEventService.Providers
|
|
{
|
|
public abstract class XBaseEventProducerService
|
|
{
|
|
protected readonly XEventServiceConfiguration configuration;
|
|
protected readonly ILogger<XBaseEventProducerService> logger;
|
|
|
|
protected XBaseEventProducerService(
|
|
XEventServiceConfiguration configuration,
|
|
ILogger<XBaseEventProducerService> logger
|
|
)
|
|
{
|
|
//
|
|
this.logger = logger;
|
|
this.configuration = configuration;
|
|
|
|
//
|
|
// Validate Configurations ...
|
|
if (!configuration.IsValid())
|
|
{
|
|
XException.InvalidConfiguration.Throw();
|
|
}
|
|
}
|
|
}
|
|
} |