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

This commit is contained in:
2026-07-30 14:24:35 +03:30
parent b582b5c73a
commit c4a60f655d
10 changed files with 61 additions and 22 deletions
+10 -9
View File
@@ -10,6 +10,7 @@ using xDataService.Models;
using xExceptions.Constants;
using xPushService.DI;
using xPushService.Helpers;
using xWebinarService.Constants;
using xWebinarService.Helpers;
using xWebinarService.Interfaces.Dtos;
using xWebinarService.Interfaces.Entities;
@@ -78,12 +79,12 @@ namespace xWebinarService.DI
var pushHelper = new XPushServiceHelper();
//
pushHelper.AddHub<XWebinarDtoHub>("webinarDto");
pushHelper.AddHub<XWebinarEntityHub>("webinarEntity");
pushHelper.AddHub<XWebinarDtoHub>(XWebinarServiceConstants.XWebinarDtoHub);
pushHelper.AddHub<XWebinarEntityHub>(XWebinarServiceConstants.XWebinarEntityHub);
//
pushHelper.AddHub<XWebinarSubscriberDtoHub>("webinarSubscriberDto");
pushHelper.AddHub<XWebinarSubscriberEntityHub>("webinarSubscriberEntity");
pushHelper.AddHub<XWebinarSubscriberDtoHub>(XWebinarServiceConstants.XWebinarSubscriberDtoHub);
pushHelper.AddHub<XWebinarSubscriberEntityHub>(XWebinarServiceConstants.XWebinarSubscriberEntityHub);
//
app.UseXPushService(pushHelper);
@@ -120,7 +121,7 @@ namespace xWebinarService.DI
/// <summary>
/// a LogTag for Service ...
/// </summary>
private static string XLogTag = "XWebinarService";
private static string XLogTag = XWebinarServiceConstants.XWebinarServiceDILogTag;
/// <summary>
/// print a log in Console ...
@@ -193,17 +194,17 @@ namespace xWebinarService.DI
//
webinarDescriptor = typeof(XWebinarServiceHelper)
.InvokeGenericMethod<XRepositoryDescriptor>(
methodName: "GetXWebinarEFRepositoryDescriptor",
args: null,
runtimeType: contextType,
args: null
methodName: XWebinarServiceConstants.GetXWebinarEFRepositoryDescriptor
);
//
webinarSubscriberDescriptor = typeof(XWebinarServiceHelper)
.InvokeGenericMethod<XRepositoryDescriptor>(
methodName: "GetXWebinarSubscriberEFRepositoryDescriptor",
args: null,
runtimeType: contextType,
args: null
methodName: XWebinarServiceConstants.GetXWebinarSubscriberEFRepositoryDescriptor
);
break;