Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HarmonyCoreCodeGen.Core/Generator/SignalRGenerator.dbl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace HarmonyCoreGenerator.Generator
foreach iface in GeneratorBase.GetTargetInterfaces(^nameof(SignalRGenerator), targetSolution)
begin
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate a SignalR hub for the Interface", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, iface, ^nameof(SignalRGenerator),
& new string[#] { "SignalRHub" }, new UserToken[#] { new UserToken("MODELS_NAMESPACE", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models")) }, Path.Combine(targetSolution.TemplatesFolder,"SignalR")))
& new string[#] { "SignalRHub" }, new UserToken[#] { new UserToken("MODELS_NAMESPACE", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models")), new UserToken("DTOS_NAMESPACE", iface.Name) }, Path.Combine(targetSolution.TemplatesFolder,"SignalR")))
end

mreturn result
Expand Down
12 changes: 8 additions & 4 deletions HarmonyCoreCodeGen.Core/Generator/TraditionalBridgeGenerator.dbl
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,29 @@ namespace HarmonyCoreGenerator.Generator
begin
;; Request and response models for the service class methods (.NET side)
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate request and response models for the service class methods", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, iface, ^nameof(TraditionalBridgeGenerator),
& new string[#] { "MultiInterfaceServiceModels" }, new UserToken[#] { modelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
& new string[#] { "MultiInterfaceServiceModels" }, new UserToken[#] { modelsNamespace, new UserToken("DTOS_NAMESPACE", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models"))}, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
end
else
begin
;; Request and response models for the service class methods (.NET side)
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate request and response models for the service class methods", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, iface, ^nameof(TraditionalBridgeGenerator),
& new string[#] { "InterfaceServiceModels" }, new UserToken[#] { modelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
& new string[#] { "InterfaceServiceModels" }, new UserToken[#] { modelsNamespace, new UserToken("DTOS_NAMESPACE", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models")) }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
end

;; Service class (.NET side)
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate the service class (.NET side)", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, iface, ^nameof(TraditionalBridgeGenerator),
& new string[#] { "InterfaceService" }, new UserToken[#] { modelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
& new string[#] { "InterfaceService" }, new UserToken[#] { modelsNamespace, new UserToken("DTOS_NAMESPACE", String.Format("{0}.{1}", targetSolution.TraditionalBridgeFolder, iface.Name)) }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))

;; Parameter model classes (Traditional Side)
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate data models for structure parameters", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models"), Path.Combine(targetSolution.TraditionalBridgeFolder,"Models"), iface, ^nameof(TraditionalBridgeGenerator),
& new string[#] { "TraditionalModel", "TraditionalMetadata" }, new UserToken[#] { modelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))

result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate model and metadata classes", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, iface, ^nameof(ModelGenerator), new string[#] { "ODataModel", "ODataMetaData" }, ^null, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate model and metadata classes", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, iface, ^nameof(TraditionalBridgeGenerator), new string[#] { "ODataModel", "ODataMetaData" }, ^null, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))

;; Add InterfaceDispatcherData
data interfaceDispatcherDataTask = StructureTaskHelper(targetSolution, "Generate InterfaceDispatcherData", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Dispatchers"), Path.Combine(targetSolution.TraditionalBridgeFolder,"Dispatchers"), true, ^nameof(TraditionalBridgeGenerator), new string[#] { "InterfaceDispatcherData" }, new UserToken[#] { new UserToken("SMC_INTERFACE", iface.Name), new UserToken("DTOS_NAMESPACE", iface.Name) }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge"))
interfaceDispatcherDataTask.Interface = iface.Name
result.Add(interfaceDispatcherDataTask)
end
mreturn result
endmethod
Expand Down
2 changes: 1 addition & 1 deletion HarmonyCoreCodeGen.Core/Generator/WebApiGenerator.dbl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace HarmonyCoreGenerator.Generator
;; Web API controller (.NET side)
data modelsNamespace = new UserToken("MODELS_NAMESPACE", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models"))
result.Add(GeneratorBase.InterfaceTaskHelper(targetSolution, "Generate Web API controller (.NET side)", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Models"), Path.Combine(targetSolution.TraditionalBridgeFolder,"Models"), iface, ^nameof(WebApiGenerator),
& new string[#] { "InterfaceController" }, new UserToken[#] { modelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
& new string[#] { "InterfaceController" }, new UserToken[#] { modelsNamespace, new UserToken("DTOS_NAMESPACE", iface.Name) }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))

;; Postman tests for the WebAPI operations

Expand Down