From 36a95c8a63d89e074a30add65f75583d18893c9b Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Thu, 14 Jun 2018 07:01:17 -0500 Subject: [PATCH] refactor file hierarchy --- .../{Engines => Abstractions}/IAgentImporter.cs | 0 .../{Engines => Abstractions}/IBotPlatform.cs | 0 .../{Engines => Abstractions}/INlpEntitizer.cs | 0 .../{Engines => Abstractions}/INlpFeaturizer.cs | 0 .../{Engines => Abstractions}/INlpProvider.cs | 0 .../{Engines => Abstractions}/INlpTokenizer.cs | 0 BotSharp.Core/BotSharp.Core.csproj | 9 ++++----- .../Dialogflow}/AIConfiguration.cs | 0 .../{Models => Engines/Dialogflow}/AIContext.cs | 0 .../{Models => Engines/Dialogflow}/AIRequest.cs | 0 .../{Models => Engines/Dialogflow}/AIResponse.cs | 0 .../Dialogflow}/AIResponseCustomPayload.cs | 0 .../Dialogflow}/AIResponseFulfillment.cs | 0 .../Dialogflow}/AIResponseMessageBase.cs | 0 .../Dialogflow}/AIResponseMessageType.cs | 0 .../Dialogflow}/AIResponseMetadata.cs | 0 .../Dialogflow}/AIResponseResult.cs | 0 .../Dialogflow}/AIResponseStatus.cs | 0 .../AgentImporterInDialogflow.cs | 0 .../Dialogflow/DialogflowAgent.cs | 0 .../Dialogflow/DialogflowEntity.cs | 0 .../Dialogflow/DialogflowEntityEntry.cs | 0 .../Dialogflow/DialogflowIntent.cs | 0 .../Dialogflow/DialogflowIntentEvent.cs | 0 .../Dialogflow/DialogflowIntentExpression.cs | 0 .../Dialogflow/DialogflowIntentExpressionPart.cs | 0 .../Dialogflow/DialogflowIntentResponse.cs | 0 .../DialogflowIntentResponseMessage.cs | 0 .../DialogflowIntentResponseParameter.cs | 0 .../DialogflowIntentResponseParameterPrompt.cs | 0 .../Dialogflow}/OriginalRequest.cs | 0 .../Dialogflow}/QuestionMetadata.cs | 0 .../Dialogflow}/RequestExtras.cs | 0 .../Dialogflow}/SupportedLanguage.cs | 0 BotSharp.Core/Engines/{ => Rasa}/RasaAi.cs | 0 .../Rasa}/RasaIntentExpression.cs | 0 .../Rasa}/RasaIntentExpressionPart.cs | 0 BotSharp.Core/Engines/{ => Rasa}/RasaOptions.cs | 0 .../{Models => Engines/Rasa}/RasaResponse.cs | 0 .../Rasa}/RasaResponseEntity.cs | 0 .../{Models => Engines/Rasa}/RasaTrainingData.cs | 0 .../Rasa/RasaTraningEntity.cs | 0 BotSharp.Core/Engines/SpaCy/SpaCyProvider.cs | 3 +-- BotSharp.Core/{Models => NLP}/NlpEntity.cs | 0 BotSharp.Core/{Models => NLP}/NlpToken.cs | 0 BotSharp.Core/Utilities/JsonContent.cs | 16 ---------------- 46 files changed, 5 insertions(+), 23 deletions(-) rename BotSharp.Core/{Engines => Abstractions}/IAgentImporter.cs (100%) rename BotSharp.Core/{Engines => Abstractions}/IBotPlatform.cs (100%) rename BotSharp.Core/{Engines => Abstractions}/INlpEntitizer.cs (100%) rename BotSharp.Core/{Engines => Abstractions}/INlpFeaturizer.cs (100%) rename BotSharp.Core/{Engines => Abstractions}/INlpProvider.cs (100%) rename BotSharp.Core/{Engines => Abstractions}/INlpTokenizer.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIConfiguration.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIContext.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIRequest.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponse.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseCustomPayload.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseFulfillment.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseMessageBase.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseMessageType.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseMetadata.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseResult.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/AIResponseStatus.cs (100%) rename BotSharp.Core/Engines/{ => Dialogflow}/AgentImporterInDialogflow.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowAgent.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowEntity.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowEntityEntry.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntent.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentEvent.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentExpression.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentExpressionPart.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentResponse.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentResponseMessage.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentResponseParameter.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Dialogflow/DialogflowIntentResponseParameterPrompt.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/OriginalRequest.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/QuestionMetadata.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/RequestExtras.cs (100%) rename BotSharp.Core/{Models => Engines/Dialogflow}/SupportedLanguage.cs (100%) rename BotSharp.Core/Engines/{ => Rasa}/RasaAi.cs (100%) rename BotSharp.Core/{Models => Engines/Rasa}/RasaIntentExpression.cs (100%) rename BotSharp.Core/{Models => Engines/Rasa}/RasaIntentExpressionPart.cs (100%) rename BotSharp.Core/Engines/{ => Rasa}/RasaOptions.cs (100%) rename BotSharp.Core/{Models => Engines/Rasa}/RasaResponse.cs (100%) rename BotSharp.Core/{Models => Engines/Rasa}/RasaResponseEntity.cs (100%) rename BotSharp.Core/{Models => Engines/Rasa}/RasaTrainingData.cs (100%) rename BotSharp.Core/{Adapters => Engines}/Rasa/RasaTraningEntity.cs (100%) rename BotSharp.Core/{Models => NLP}/NlpEntity.cs (100%) rename BotSharp.Core/{Models => NLP}/NlpToken.cs (100%) delete mode 100644 BotSharp.Core/Utilities/JsonContent.cs diff --git a/BotSharp.Core/Engines/IAgentImporter.cs b/BotSharp.Core/Abstractions/IAgentImporter.cs similarity index 100% rename from BotSharp.Core/Engines/IAgentImporter.cs rename to BotSharp.Core/Abstractions/IAgentImporter.cs diff --git a/BotSharp.Core/Engines/IBotPlatform.cs b/BotSharp.Core/Abstractions/IBotPlatform.cs similarity index 100% rename from BotSharp.Core/Engines/IBotPlatform.cs rename to BotSharp.Core/Abstractions/IBotPlatform.cs diff --git a/BotSharp.Core/Engines/INlpEntitizer.cs b/BotSharp.Core/Abstractions/INlpEntitizer.cs similarity index 100% rename from BotSharp.Core/Engines/INlpEntitizer.cs rename to BotSharp.Core/Abstractions/INlpEntitizer.cs diff --git a/BotSharp.Core/Engines/INlpFeaturizer.cs b/BotSharp.Core/Abstractions/INlpFeaturizer.cs similarity index 100% rename from BotSharp.Core/Engines/INlpFeaturizer.cs rename to BotSharp.Core/Abstractions/INlpFeaturizer.cs diff --git a/BotSharp.Core/Engines/INlpProvider.cs b/BotSharp.Core/Abstractions/INlpProvider.cs similarity index 100% rename from BotSharp.Core/Engines/INlpProvider.cs rename to BotSharp.Core/Abstractions/INlpProvider.cs diff --git a/BotSharp.Core/Engines/INlpTokenizer.cs b/BotSharp.Core/Abstractions/INlpTokenizer.cs similarity index 100% rename from BotSharp.Core/Engines/INlpTokenizer.cs rename to BotSharp.Core/Abstractions/INlpTokenizer.cs diff --git a/BotSharp.Core/BotSharp.Core.csproj b/BotSharp.Core/BotSharp.Core.csproj index 68ba3180..9e372958 100644 --- a/BotSharp.Core/BotSharp.Core.csproj +++ b/BotSharp.Core/BotSharp.Core.csproj @@ -23,11 +23,6 @@ https://github.com/Oceania2018/BotSharp - - - - - @@ -35,4 +30,8 @@ + + + + diff --git a/BotSharp.Core/Models/AIConfiguration.cs b/BotSharp.Core/Engines/Dialogflow/AIConfiguration.cs similarity index 100% rename from BotSharp.Core/Models/AIConfiguration.cs rename to BotSharp.Core/Engines/Dialogflow/AIConfiguration.cs diff --git a/BotSharp.Core/Models/AIContext.cs b/BotSharp.Core/Engines/Dialogflow/AIContext.cs similarity index 100% rename from BotSharp.Core/Models/AIContext.cs rename to BotSharp.Core/Engines/Dialogflow/AIContext.cs diff --git a/BotSharp.Core/Models/AIRequest.cs b/BotSharp.Core/Engines/Dialogflow/AIRequest.cs similarity index 100% rename from BotSharp.Core/Models/AIRequest.cs rename to BotSharp.Core/Engines/Dialogflow/AIRequest.cs diff --git a/BotSharp.Core/Models/AIResponse.cs b/BotSharp.Core/Engines/Dialogflow/AIResponse.cs similarity index 100% rename from BotSharp.Core/Models/AIResponse.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponse.cs diff --git a/BotSharp.Core/Models/AIResponseCustomPayload.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseCustomPayload.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseCustomPayload.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseCustomPayload.cs diff --git a/BotSharp.Core/Models/AIResponseFulfillment.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseFulfillment.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseFulfillment.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseFulfillment.cs diff --git a/BotSharp.Core/Models/AIResponseMessageBase.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseMessageBase.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseMessageBase.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseMessageBase.cs diff --git a/BotSharp.Core/Models/AIResponseMessageType.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseMessageType.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseMessageType.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseMessageType.cs diff --git a/BotSharp.Core/Models/AIResponseMetadata.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseMetadata.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseMetadata.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseMetadata.cs diff --git a/BotSharp.Core/Models/AIResponseResult.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseResult.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseResult.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseResult.cs diff --git a/BotSharp.Core/Models/AIResponseStatus.cs b/BotSharp.Core/Engines/Dialogflow/AIResponseStatus.cs similarity index 100% rename from BotSharp.Core/Models/AIResponseStatus.cs rename to BotSharp.Core/Engines/Dialogflow/AIResponseStatus.cs diff --git a/BotSharp.Core/Engines/AgentImporterInDialogflow.cs b/BotSharp.Core/Engines/Dialogflow/AgentImporterInDialogflow.cs similarity index 100% rename from BotSharp.Core/Engines/AgentImporterInDialogflow.cs rename to BotSharp.Core/Engines/Dialogflow/AgentImporterInDialogflow.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowAgent.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowAgent.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowAgent.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowAgent.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowEntity.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowEntity.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowEntity.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowEntity.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowEntityEntry.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowEntityEntry.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowEntityEntry.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowEntityEntry.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntent.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntent.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntent.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntent.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentEvent.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentEvent.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentEvent.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentEvent.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentExpression.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentExpression.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentExpression.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentExpression.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentExpressionPart.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentExpressionPart.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentExpressionPart.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentExpressionPart.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponse.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponse.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponse.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponse.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponseMessage.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponseMessage.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponseMessage.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponseMessage.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponseParameter.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponseParameter.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponseParameter.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponseParameter.cs diff --git a/BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponseParameterPrompt.cs b/BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponseParameterPrompt.cs similarity index 100% rename from BotSharp.Core/Adapters/Dialogflow/DialogflowIntentResponseParameterPrompt.cs rename to BotSharp.Core/Engines/Dialogflow/DialogflowIntentResponseParameterPrompt.cs diff --git a/BotSharp.Core/Models/OriginalRequest.cs b/BotSharp.Core/Engines/Dialogflow/OriginalRequest.cs similarity index 100% rename from BotSharp.Core/Models/OriginalRequest.cs rename to BotSharp.Core/Engines/Dialogflow/OriginalRequest.cs diff --git a/BotSharp.Core/Models/QuestionMetadata.cs b/BotSharp.Core/Engines/Dialogflow/QuestionMetadata.cs similarity index 100% rename from BotSharp.Core/Models/QuestionMetadata.cs rename to BotSharp.Core/Engines/Dialogflow/QuestionMetadata.cs diff --git a/BotSharp.Core/Models/RequestExtras.cs b/BotSharp.Core/Engines/Dialogflow/RequestExtras.cs similarity index 100% rename from BotSharp.Core/Models/RequestExtras.cs rename to BotSharp.Core/Engines/Dialogflow/RequestExtras.cs diff --git a/BotSharp.Core/Models/SupportedLanguage.cs b/BotSharp.Core/Engines/Dialogflow/SupportedLanguage.cs similarity index 100% rename from BotSharp.Core/Models/SupportedLanguage.cs rename to BotSharp.Core/Engines/Dialogflow/SupportedLanguage.cs diff --git a/BotSharp.Core/Engines/RasaAi.cs b/BotSharp.Core/Engines/Rasa/RasaAi.cs similarity index 100% rename from BotSharp.Core/Engines/RasaAi.cs rename to BotSharp.Core/Engines/Rasa/RasaAi.cs diff --git a/BotSharp.Core/Models/RasaIntentExpression.cs b/BotSharp.Core/Engines/Rasa/RasaIntentExpression.cs similarity index 100% rename from BotSharp.Core/Models/RasaIntentExpression.cs rename to BotSharp.Core/Engines/Rasa/RasaIntentExpression.cs diff --git a/BotSharp.Core/Models/RasaIntentExpressionPart.cs b/BotSharp.Core/Engines/Rasa/RasaIntentExpressionPart.cs similarity index 100% rename from BotSharp.Core/Models/RasaIntentExpressionPart.cs rename to BotSharp.Core/Engines/Rasa/RasaIntentExpressionPart.cs diff --git a/BotSharp.Core/Engines/RasaOptions.cs b/BotSharp.Core/Engines/Rasa/RasaOptions.cs similarity index 100% rename from BotSharp.Core/Engines/RasaOptions.cs rename to BotSharp.Core/Engines/Rasa/RasaOptions.cs diff --git a/BotSharp.Core/Models/RasaResponse.cs b/BotSharp.Core/Engines/Rasa/RasaResponse.cs similarity index 100% rename from BotSharp.Core/Models/RasaResponse.cs rename to BotSharp.Core/Engines/Rasa/RasaResponse.cs diff --git a/BotSharp.Core/Models/RasaResponseEntity.cs b/BotSharp.Core/Engines/Rasa/RasaResponseEntity.cs similarity index 100% rename from BotSharp.Core/Models/RasaResponseEntity.cs rename to BotSharp.Core/Engines/Rasa/RasaResponseEntity.cs diff --git a/BotSharp.Core/Models/RasaTrainingData.cs b/BotSharp.Core/Engines/Rasa/RasaTrainingData.cs similarity index 100% rename from BotSharp.Core/Models/RasaTrainingData.cs rename to BotSharp.Core/Engines/Rasa/RasaTrainingData.cs diff --git a/BotSharp.Core/Adapters/Rasa/RasaTraningEntity.cs b/BotSharp.Core/Engines/Rasa/RasaTraningEntity.cs similarity index 100% rename from BotSharp.Core/Adapters/Rasa/RasaTraningEntity.cs rename to BotSharp.Core/Engines/Rasa/RasaTraningEntity.cs diff --git a/BotSharp.Core/Engines/SpaCy/SpaCyProvider.cs b/BotSharp.Core/Engines/SpaCy/SpaCyProvider.cs index 51a6ab0b..5651a36b 100644 --- a/BotSharp.Core/Engines/SpaCy/SpaCyProvider.cs +++ b/BotSharp.Core/Engines/SpaCy/SpaCyProvider.cs @@ -1,5 +1,4 @@ -using BotSharp.Core.Utilities; -using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Configuration; using RestSharp; using System; using System.Collections.Generic; diff --git a/BotSharp.Core/Models/NlpEntity.cs b/BotSharp.Core/NLP/NlpEntity.cs similarity index 100% rename from BotSharp.Core/Models/NlpEntity.cs rename to BotSharp.Core/NLP/NlpEntity.cs diff --git a/BotSharp.Core/Models/NlpToken.cs b/BotSharp.Core/NLP/NlpToken.cs similarity index 100% rename from BotSharp.Core/Models/NlpToken.cs rename to BotSharp.Core/NLP/NlpToken.cs diff --git a/BotSharp.Core/Utilities/JsonContent.cs b/BotSharp.Core/Utilities/JsonContent.cs deleted file mode 100644 index c1983806..00000000 --- a/BotSharp.Core/Utilities/JsonContent.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Text; - -namespace BotSharp.Core.Utilities -{ - public class JsonContent : StringContent - { - public JsonContent(object obj) : - base(JsonConvert.SerializeObject(obj), Encoding.UTF8, "application/json") - { - } - } -}