last ...
This commit is contained in:
@@ -5,17 +5,30 @@ using System.Threading.Tasks;
|
||||
using AutoMapper;
|
||||
using xAiModels.Models.Dtos;
|
||||
using xAiModels.Models.Entities;
|
||||
using xIdentityService.Interfaces;
|
||||
|
||||
namespace xAiModels.Configurations.Entities
|
||||
{
|
||||
public class XAiConversationMappingAction : IMappingAction<XAiConversation, XAiConversationDto>
|
||||
{
|
||||
private readonly IXIdentityProvider identityProvider;
|
||||
|
||||
public XAiConversationMappingAction(
|
||||
IXIdentityProvider identityProvider
|
||||
)
|
||||
{
|
||||
this.identityProvider = identityProvider;
|
||||
}
|
||||
|
||||
public void Process(
|
||||
XAiConversation source,
|
||||
XAiConversationDto destination,
|
||||
ResolutionContext context
|
||||
)
|
||||
{
|
||||
//
|
||||
// Retrieve Owner ...
|
||||
// Retrieve Project Info ...
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,21 @@ using System.Threading.Tasks;
|
||||
using AutoMapper;
|
||||
using xAiModels.Models.Dtos;
|
||||
using xAiModels.Models.Entities;
|
||||
using xIdentityService.Interfaces;
|
||||
|
||||
namespace xAiModels.Configurations.Entities
|
||||
{
|
||||
public class XAiMessageMappingAction : IMappingAction<XAiMessage, XAiMessageDto>
|
||||
{
|
||||
private readonly IXIdentityProvider identityProvider;
|
||||
|
||||
public XAiMessageMappingAction(
|
||||
IXIdentityProvider identityProvider
|
||||
)
|
||||
{
|
||||
this.identityProvider = identityProvider;
|
||||
}
|
||||
|
||||
public void Process(
|
||||
XAiMessage source,
|
||||
XAiMessageDto destination,
|
||||
|
||||
@@ -5,11 +5,21 @@ using System.Threading.Tasks;
|
||||
using AutoMapper;
|
||||
using xAiModels.Models.Dtos;
|
||||
using xAiModels.Models.Entities;
|
||||
using xIdentityService.Interfaces;
|
||||
|
||||
namespace xAiModels.Configurations.Entities
|
||||
{
|
||||
public class XAiProjectMappingAction : IMappingAction<XAiProject, XAiProjectDto>
|
||||
{
|
||||
private readonly IXIdentityProvider identityProvider;
|
||||
|
||||
public XAiProjectMappingAction(
|
||||
IXIdentityProvider identityProvider
|
||||
)
|
||||
{
|
||||
this.identityProvider = identityProvider;
|
||||
}
|
||||
|
||||
public void Process(
|
||||
XAiProject source,
|
||||
XAiProjectDto destination,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using xAiModels.Constants;
|
||||
using xAiModels.Models;
|
||||
|
||||
namespace xAiModels.Configurations
|
||||
@@ -10,13 +11,18 @@ namespace xAiModels.Configurations
|
||||
public XAiModelDescriptor[] Models { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Each User must Has a Default Project ...
|
||||
/// Each User must Has a Default Project, this is Title Resource Identifier ...
|
||||
/// </summary>
|
||||
public string DefaultProjectResource { get; set; }
|
||||
public string DefaultProjectTitleResource { get; set; } = XAiModelsConstants.DefaultXAiProjectTitleResourceID;
|
||||
|
||||
/// <summary>
|
||||
/// Each User must Has a Default Conversation ...
|
||||
/// Each User must Has a Default Project, this is Description Resource Identifier ...
|
||||
/// </summary>
|
||||
public string DefaultConversationResource { get; set; }
|
||||
public string DefaultProjectDescriptionResource { get; set; } = XAiModelsConstants.DefaultXAiProjectDescriptionResourceID;
|
||||
|
||||
/// <summary>
|
||||
/// Each User must Has a Default Conversation, this is Title Resource Identifier ... ...
|
||||
/// </summary>
|
||||
public string DefaultConversationTitleResource { get; set; } = XAiModelsConstants.DefaultXAiConversationTitleResourceID;
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,11 @@ namespace xAiModels.Constants
|
||||
// EF Repositories Helper Extensions ...
|
||||
public const string GetXAiMessageEFRepositoryDescriptor = "GetXAiMessageEFRepositoryDescriptor";
|
||||
public const string GetXAiProjectEFRepositoryDescriptor = "GetXAiProjectEFRepositoryDescriptor";
|
||||
public const string GetXAiConversationEFRepositoryDescriptor = "GetXAiConversationEFRepositoryDescriptor";
|
||||
public const string GetXAiConversationEFRepositoryDescriptor = "GetXAiConversationEFRepositoryDescriptor";
|
||||
|
||||
//
|
||||
public const string DefaultXAiProjectTitleResourceID = "XAiPrjT";
|
||||
public const string DefaultXAiConversationTitleResourceID = "XAiCnvT";
|
||||
public const string DefaultXAiProjectDescriptionResourceID = "XAiPrjD";
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,8 @@ namespace xAiModels.Providers
|
||||
public XAiConversationTitleResourceProvider(
|
||||
IXStringServiceProvider stringProvider
|
||||
) : base(
|
||||
item: XAiModelsConstants.XAiConversationTitleIdentifier,
|
||||
stringProvider
|
||||
stringProvider: stringProvider,
|
||||
item: XAiModelsConstants.XAiConversationTitleIdentifier
|
||||
)
|
||||
{ }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using xAiModels.Interfaces;
|
||||
using xAiModels.Interfaces.Entities;
|
||||
using xAiModels.Providers.Dtos;
|
||||
using xAiModels.Providers.Entities;
|
||||
|
||||
namespace xAiModels.Providers
|
||||
{
|
||||
/// <summary>
|
||||
/// All Data Manipulation Requirements ...
|
||||
/// </summary>
|
||||
public class XAiDataProvider : IXAiDataProvider
|
||||
{
|
||||
private readonly IHubContext<XAiMessageDtoHub> messageDtoHub;
|
||||
private readonly IHubContext<XAiProjectDtoHub> projectDtoHub;
|
||||
private readonly IXAiMessageRepository messageRepositoryService;
|
||||
private readonly IXAiProjectRepository projectRepositoryService;
|
||||
private readonly IHubContext<XAiMessageEntityHub> messageEntityHub;
|
||||
private readonly IHubContext<XAiProjectEntityHub> projectEntityHub;
|
||||
private readonly IXAiConversationRepository conversationRepository;
|
||||
private readonly IHubContext<XAiConversationDtoHub> conversationDtoHub;
|
||||
private readonly IHubContext<XAiConversationEntityHub> conversationEntityHub;
|
||||
private readonly IXAiProjectTitleResourceProvider projectTitleResourceProvider;
|
||||
private readonly IXAiConversationTitleResourceProvider conversationTitleResourceProvider;
|
||||
private readonly IXAiProjectDescriptionResourceProvider projectDescriptionResourceProvider;
|
||||
|
||||
public XAiDataProvider(
|
||||
IHubContext<XAiMessageDtoHub> messageDtoHub,
|
||||
IHubContext<XAiProjectDtoHub> projectDtoHub,
|
||||
IXAiMessageRepository messageRepositoryService,
|
||||
IXAiProjectRepository projectRepositoryService,
|
||||
IHubContext<XAiMessageEntityHub> messageEntityHub,
|
||||
IHubContext<XAiProjectEntityHub> projectEntityHub,
|
||||
IXAiConversationRepository conversationRepository,
|
||||
IHubContext<XAiConversationDtoHub> conversationDtoHub,
|
||||
IHubContext<XAiConversationEntityHub> conversationEntityHub,
|
||||
IXAiProjectTitleResourceProvider projectTitleResourceProvider,
|
||||
IXAiConversationTitleResourceProvider conversationTitleResourceProvider,
|
||||
IXAiProjectDescriptionResourceProvider projectDescriptionResourceProvider
|
||||
)
|
||||
{
|
||||
this.messageDtoHub = messageDtoHub;
|
||||
this.projectDtoHub = projectDtoHub;
|
||||
this.projectEntityHub = projectEntityHub;
|
||||
this.messageEntityHub = messageEntityHub;
|
||||
this.conversationDtoHub = conversationDtoHub;
|
||||
this.conversationEntityHub = conversationEntityHub;
|
||||
this.conversationRepository = conversationRepository;
|
||||
this.messageRepositoryService = messageRepositoryService;
|
||||
this.projectRepositoryService = projectRepositoryService;
|
||||
this.projectTitleResourceProvider = projectTitleResourceProvider;
|
||||
this.conversationTitleResourceProvider = conversationTitleResourceProvider;
|
||||
this.projectDescriptionResourceProvider = projectDescriptionResourceProvider;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,8 @@ namespace xAiModels.Providers
|
||||
public XAiProjectDescriptionResourceProvider(
|
||||
IXStringServiceProvider stringProvider
|
||||
) : base(
|
||||
item: XAiModelsConstants.XAiProjectDescriptionIdentifier,
|
||||
stringProvider
|
||||
stringProvider: stringProvider,
|
||||
item: XAiModelsConstants.XAiProjectDescriptionIdentifier
|
||||
)
|
||||
{ }
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace xAiModels.Providers
|
||||
public XAiProjectTitleResourceProvider(
|
||||
IXStringServiceProvider stringProvider
|
||||
) : base(
|
||||
item: XAiModelsConstants.XAiProjectTitleIdentifier,
|
||||
stringProvider
|
||||
stringProvider: stringProvider,
|
||||
item: XAiModelsConstants.XAiProjectTitleIdentifier
|
||||
)
|
||||
{ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user