refactor and add using constants instead of hard coded strings ...

This commit is contained in:
2026-07-30 14:26:12 +03:30
parent 3d5f2c4953
commit 01c2a04977
7 changed files with 43 additions and 11 deletions
+6 -5
View File
@@ -17,6 +17,7 @@ using xPushService.Helpers;
using xPushService.DI;
using xStringService.Interfaces;
using xStringService.Providers;
using xStringService.Constants;
namespace xStringService.DI
{
@@ -80,8 +81,8 @@ namespace xStringService.DI
var pushHelper = new XPushServiceHelper();
//
pushHelper.AddHub<XStringDtoHub>("stringDto");
pushHelper.AddHub<XStringEntityHub>("stringEntity");
pushHelper.AddHub<XStringDtoHub>(XStringServiceConstants.XStringDtoHub);
pushHelper.AddHub<XStringEntityHub>(XStringServiceConstants.XStringEntityHub);
//
app.UseXPushService(pushHelper);
@@ -106,7 +107,7 @@ namespace xStringService.DI
/// <summary>
/// a LogTag for Service ...
/// </summary>
private static string XLogTag = "XStringService";
private static string XLogTag = XStringServiceConstants.XStringServiceDILogTag;
/// <summary>
/// print a log in Console ...
@@ -179,9 +180,9 @@ namespace xStringService.DI
//
descriptor = typeof(XStringServiceHelper)
.InvokeGenericMethod<XRepositoryDescriptor>(
methodName: "GetXStringEFRepositoryDescriptor",
args: null,
runtimeType: contextType,
args: null
methodName: XStringServiceConstants.GetXStringEFRepositoryDescriptor
);
break;