Add XBaseResourceProvider Class and Interfaces for Handle String Resource Based Services Implementation ...
This commit is contained in:
@@ -4,6 +4,7 @@ using xExceptions.Constants;
|
||||
using xCommons.Extensions;
|
||||
using xStringService.Interfaces;
|
||||
using xStringService.Providers;
|
||||
using xStringService.Interfaces.Entities;
|
||||
|
||||
namespace xStringService.DI
|
||||
{
|
||||
@@ -74,6 +75,18 @@ namespace xStringService.DI
|
||||
throw exception;
|
||||
}
|
||||
|
||||
//
|
||||
// Check String Repository Exists ...
|
||||
var isStringRepositoryExists = !services
|
||||
.GetRegisteredService<IXStringRepository>()
|
||||
.IsNull();
|
||||
if (!isStringRepositoryExists)
|
||||
{
|
||||
//
|
||||
Log("AddStringService failed, IXStringRepository not provided ...");
|
||||
throw exception;
|
||||
}
|
||||
|
||||
//
|
||||
services.Add(new ServiceDescriptor(typeof(IXStringProvider), typeof(XStringProvider), lifeTime));
|
||||
Log("AddStringService Succeed ...");
|
||||
|
||||
Reference in New Issue
Block a user