refactor and add using constants instead of hard coded strings ...
This commit is contained in:
@@ -38,5 +38,11 @@ namespace xAiModels.Constants
|
||||
public const string XAiProjectTitleIdentifier = "AiPrjT";
|
||||
public const string XAiProjectDescriptionIdentifier = "AiPrjD";
|
||||
public const string XAiConversationTitleIdentifier = "AiCnvrT";
|
||||
|
||||
//
|
||||
// EF Repositories Helper Extensions ...
|
||||
public const string GetXAiMessageEFRepositoryDescriptor = "GetXAiMessageEFRepositoryDescriptor";
|
||||
public const string GetXAiProjectEFRepositoryDescriptor = "GetXAiProjectEFRepositoryDescriptor";
|
||||
public const string GetXAiConversationEFRepositoryDescriptor = "GetXAiConversationEFRepositoryDescriptor";
|
||||
}
|
||||
}
|
||||
+11
-12
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using xAiModels.Providers.Dtos;
|
||||
@@ -84,11 +83,6 @@ namespace xAiModels.DI
|
||||
//
|
||||
var pushHelper = new XPushServiceHelper();
|
||||
|
||||
//
|
||||
// XAiConversation ...
|
||||
pushHelper.AddHub<XAiConversationDtoHub>(XAiModelsConstants.XAiConversationDtoHub);
|
||||
pushHelper.AddHub<XAiConversationEntityHub>(XAiModelsConstants.XAiConversationEntityHub);
|
||||
|
||||
//
|
||||
// XAiMessage ...
|
||||
pushHelper.AddHub<XAiMessageDtoHub>(XAiModelsConstants.XAiMessageDtoHub);
|
||||
@@ -99,6 +93,11 @@ namespace xAiModels.DI
|
||||
pushHelper.AddHub<XAiProjectDtoHub>(XAiModelsConstants.XAiProjectDtoHub);
|
||||
pushHelper.AddHub<XAiProjectEntityHub>(XAiModelsConstants.XAiProjectEntityHub);
|
||||
|
||||
//
|
||||
// XAiConversation ...
|
||||
pushHelper.AddHub<XAiConversationDtoHub>(XAiModelsConstants.XAiConversationDtoHub);
|
||||
pushHelper.AddHub<XAiConversationEntityHub>(XAiModelsConstants.XAiConversationEntityHub);
|
||||
|
||||
//
|
||||
app.UseXPushService(pushHelper);
|
||||
#endregion
|
||||
@@ -325,27 +324,27 @@ namespace xAiModels.DI
|
||||
// XAiMessage ...
|
||||
aiMessageDescriptor = typeof(XAiModelsHelper)
|
||||
.InvokeGenericMethod<XRepositoryDescriptor>(
|
||||
methodName: "GetXAiMessageEFRepositoryDescriptor",
|
||||
args: null,
|
||||
runtimeType: contextType,
|
||||
args: null
|
||||
methodName: XAiModelsConstants.GetXAiMessageEFRepositoryDescriptor
|
||||
);
|
||||
|
||||
//
|
||||
// XAiProject ...
|
||||
aiProjectDescriptor = typeof(XAiModelsHelper)
|
||||
.InvokeGenericMethod<XRepositoryDescriptor>(
|
||||
methodName: "GetXAiProjectEFRepositoryDescriptor",
|
||||
args: null,
|
||||
runtimeType: contextType,
|
||||
args: null
|
||||
methodName: XAiModelsConstants.GetXAiProjectEFRepositoryDescriptor
|
||||
);
|
||||
|
||||
//
|
||||
// XAiConversation ...
|
||||
aiConversationDescriptor = typeof(XAiModelsHelper)
|
||||
.InvokeGenericMethod<XRepositoryDescriptor>(
|
||||
methodName: "GetXAiConversationEFRepositoryDescriptor",
|
||||
args: null,
|
||||
runtimeType: contextType,
|
||||
args: null
|
||||
methodName: XAiModelsConstants.GetXAiConversationEFRepositoryDescriptor
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user