Add XBaseResourceProvider Class and Interfaces for Handle String Resource Based Services Implementation ...

This commit is contained in:
2025-11-05 05:09:38 +03:30
parent 997d5a60d0
commit 0ba543136d
5 changed files with 530 additions and 8 deletions
+13
View File
@@ -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 ...");