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

This commit is contained in:
2026-07-30 14:26:51 +03:30
parent 651fde1cd8
commit 9c101a63eb
7 changed files with 49 additions and 14 deletions
+6 -5
View File
@@ -17,6 +17,7 @@ using xFileService.Providers.Dtos;
using xFileService.Providers.Entities;
using xFileService.Interfaces;
using xFileService.Providers;
using xFileService.Constants;
namespace xFileService.DI
{
@@ -80,8 +81,8 @@ namespace xFileService.DI
var pushHelper = new XPushServiceHelper();
//
pushHelper.AddHub<XFileDtoHub>("fileDto");
pushHelper.AddHub<XFileEntityHub>("fileEntity");
pushHelper.AddHub<XFileDtoHub>(XFileServiceConstants.XFileDtoHub);
pushHelper.AddHub<XFileEntityHub>(XFileServiceConstants.XFileEntityHub);
//
app.UseXPushService(pushHelper);
@@ -106,7 +107,7 @@ namespace xFileService.DI
/// <summary>
/// a LogTag for Service ...
/// </summary>
private static string XLogTag = "XFileService";
private static string XLogTag = XFileServiceConstants.XFileServiceDILogTag;
/// <summary>
/// print a log in Console ...
@@ -179,9 +180,9 @@ namespace xFileService.DI
//
descriptor = typeof(XFileServiceHelper)
.InvokeGenericMethod<XRepositoryDescriptor>(
methodName: "GetXFileEFRepositoryDescriptor",
args: null,
runtimeType: contextType,
args: null
methodName: XFileServiceConstants.GetXFileEFRepositoryDescriptor
);
break;