Files
xEventService/Providers/XBaseEventProducerService.cs
T

31 lines
875 B
C#

using Microsoft.Extensions.Logging;
using xCommons.Extensions;
using xEventService.Configuration;
using xEventService.Extensions;
using xExceptions.Constants;
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();
}
}
}
}