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 XAiProjectTitleIdentifier = "AiPrjT";
|
||||||
public const string XAiProjectDescriptionIdentifier = "AiPrjD";
|
public const string XAiProjectDescriptionIdentifier = "AiPrjD";
|
||||||
public const string XAiConversationTitleIdentifier = "AiCnvrT";
|
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;
|
||||||
using System.Linq;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using xAiModels.Providers.Dtos;
|
using xAiModels.Providers.Dtos;
|
||||||
@@ -84,11 +83,6 @@ namespace xAiModels.DI
|
|||||||
//
|
//
|
||||||
var pushHelper = new XPushServiceHelper();
|
var pushHelper = new XPushServiceHelper();
|
||||||
|
|
||||||
//
|
|
||||||
// XAiConversation ...
|
|
||||||
pushHelper.AddHub<XAiConversationDtoHub>(XAiModelsConstants.XAiConversationDtoHub);
|
|
||||||
pushHelper.AddHub<XAiConversationEntityHub>(XAiModelsConstants.XAiConversationEntityHub);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// XAiMessage ...
|
// XAiMessage ...
|
||||||
pushHelper.AddHub<XAiMessageDtoHub>(XAiModelsConstants.XAiMessageDtoHub);
|
pushHelper.AddHub<XAiMessageDtoHub>(XAiModelsConstants.XAiMessageDtoHub);
|
||||||
@@ -99,6 +93,11 @@ namespace xAiModels.DI
|
|||||||
pushHelper.AddHub<XAiProjectDtoHub>(XAiModelsConstants.XAiProjectDtoHub);
|
pushHelper.AddHub<XAiProjectDtoHub>(XAiModelsConstants.XAiProjectDtoHub);
|
||||||
pushHelper.AddHub<XAiProjectEntityHub>(XAiModelsConstants.XAiProjectEntityHub);
|
pushHelper.AddHub<XAiProjectEntityHub>(XAiModelsConstants.XAiProjectEntityHub);
|
||||||
|
|
||||||
|
//
|
||||||
|
// XAiConversation ...
|
||||||
|
pushHelper.AddHub<XAiConversationDtoHub>(XAiModelsConstants.XAiConversationDtoHub);
|
||||||
|
pushHelper.AddHub<XAiConversationEntityHub>(XAiModelsConstants.XAiConversationEntityHub);
|
||||||
|
|
||||||
//
|
//
|
||||||
app.UseXPushService(pushHelper);
|
app.UseXPushService(pushHelper);
|
||||||
#endregion
|
#endregion
|
||||||
@@ -325,27 +324,27 @@ namespace xAiModels.DI
|
|||||||
// XAiMessage ...
|
// XAiMessage ...
|
||||||
aiMessageDescriptor = typeof(XAiModelsHelper)
|
aiMessageDescriptor = typeof(XAiModelsHelper)
|
||||||
.InvokeGenericMethod<XRepositoryDescriptor>(
|
.InvokeGenericMethod<XRepositoryDescriptor>(
|
||||||
methodName: "GetXAiMessageEFRepositoryDescriptor",
|
args: null,
|
||||||
runtimeType: contextType,
|
runtimeType: contextType,
|
||||||
args: null
|
methodName: XAiModelsConstants.GetXAiMessageEFRepositoryDescriptor
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// XAiProject ...
|
// XAiProject ...
|
||||||
aiProjectDescriptor = typeof(XAiModelsHelper)
|
aiProjectDescriptor = typeof(XAiModelsHelper)
|
||||||
.InvokeGenericMethod<XRepositoryDescriptor>(
|
.InvokeGenericMethod<XRepositoryDescriptor>(
|
||||||
methodName: "GetXAiProjectEFRepositoryDescriptor",
|
args: null,
|
||||||
runtimeType: contextType,
|
runtimeType: contextType,
|
||||||
args: null
|
methodName: XAiModelsConstants.GetXAiProjectEFRepositoryDescriptor
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// XAiConversation ...
|
// XAiConversation ...
|
||||||
aiConversationDescriptor = typeof(XAiModelsHelper)
|
aiConversationDescriptor = typeof(XAiModelsHelper)
|
||||||
.InvokeGenericMethod<XRepositoryDescriptor>(
|
.InvokeGenericMethod<XRepositoryDescriptor>(
|
||||||
methodName: "GetXAiConversationEFRepositoryDescriptor",
|
args: null,
|
||||||
runtimeType: contextType,
|
runtimeType: contextType,
|
||||||
args: null
|
methodName: XAiModelsConstants.GetXAiConversationEFRepositoryDescriptor
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user