You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data targetInterfaces = GetTargetInterfaces(^nameof(TraditionalBridgeGenerator), targetSolution)
45
45
foreach iface in targetInterfaces
46
46
begin
47
-
48
47
data dtosNamespace = new UserToken("DTOS_NAMESPACE", String.Format(iface.Name))
49
48
50
49
result.Add(InterfaceTaskHelper(targetSolution, "Generate a dispatcher class for each method", String.Format("{0}.{1}",targetSolution.TraditionalBridgeNamespace,"Dispatchers"), Path.Combine(traditionalBridgeFolder,"dispatchers"), iface, ^nameof(TraditionalBridgeGenerator),
result.Add(InterfaceTaskHelper(targetSolution, "Generate the service class (.NET side)", targetSolution.ControllersNamespace, targetSolution.ControllersFolder, iface, ^nameof(TraditionalBridgeGenerator),
76
75
& new string[#] { "InterfaceService" }, new UserToken[#] { netModelsNamespace, dtosNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge"), false))
77
76
78
-
;; Parameter model classes (Traditional Side)
79
-
result.Add(InterfaceTaskHelper(targetSolution, "Generate data models for structure parameters", String.Format("{0}.{1}",targetSolution.TraditionalBridgeNamespace,"Models"), Path.Combine(traditionalBridgeFolder,"models"), iface, ^nameof(TraditionalBridgeGenerator),
80
-
& new string[#] { "TraditionalModel", "TraditionalMetadata" }, new UserToken[#] { tradModelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
81
-
82
-
result.Add(InterfaceTaskHelper(targetSolution, "Generate model and metadata classes", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, iface, ^nameof(TraditionalBridgeGenerator), new string[#] { "ODataModel", "ODataMetaData" }, ^null, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
83
-
84
-
85
77
;; Add InterfaceDispatcherData
86
78
data interfaceDispatcherDataTask = StructureTaskHelper(targetSolution, "Generate InterfaceDispatcherData", String.Format("{0}.{1}",targetSolution.TraditionalBridgeFolder,"Dispatchers"), Path.Combine(traditionalBridgeFolder,"dispatchers"), true, ^nameof(TraditionalBridgeGenerator), new string[#] { "InterfaceDispatcherCustom" }, new UserToken[#] { new UserToken("SMC_INTERFACE", iface.Name), new UserToken("DTOS_NAMESPACE", iface.Name) }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge"), false)
result.Add(InterfaceTaskHelper(targetSolution, "Generate data models for structure parameters", String.Format("{0}.{1}",targetSolution.TraditionalBridgeNamespace,"Models"), Path.Combine(traditionalBridgeFolder,"models"), targetInterfaces, ^nameof(TraditionalBridgeGenerator),
86
+
& new string[#] { "TraditionalModel", "TraditionalMetadata" }, new UserToken[#] { tradModelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
87
+
88
+
result.Add(InterfaceTaskHelper(targetSolution, "Generate model and metadata classes", targetSolution.ModelsNamespace, targetSolution.ModelsFolder, targetInterfaces, ^nameof(TraditionalBridgeGenerator), new string[#] { "ODataModel", "ODataMetaData" }, ^null, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
89
+
92
90
;;add any specifically requested structures to the traditional side
93
91
result.Add(StructureTaskHelper(targetSolution, "Generate model and metadata classes", String.Format("{0}.{1}",targetSolution.TraditionalBridgeNamespace,"Models"), Path.Combine(traditionalBridgeFolder,"models"), false, ^nameof(TraditionalBridgeGenerator), new string[#] { "TraditionalModel", "TraditionalMetadata" }, new UserToken[#] { tradModelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge")))
94
92
93
+
if(targetInterfaces.Count > 1)
94
+
begin
95
+
result.Add(InterfaceTaskHelper(targetSolution, "Generate a super dispatcher", String.Format("{0}.{1}",targetSolution.TraditionalBridgeNamespace,"Dispatchers"), Path.Combine(traditionalBridgeFolder,"dispatchers"), targetInterfaces, ^nameof(TraditionalBridgeGenerator),
96
+
& new string[#] { "InterfaceSuperDispatcher" }, new UserToken[#] { tradModelsNamespace }, Path.Combine(targetSolution.TemplatesFolder,"TraditionalBridge"), false))
0 commit comments