Skip to content

Commit 8637259

Browse files
authored
Merge pull request #265 from Synergex/net6
Net6 support
2 parents d5ccba4 + a856def commit 8637259

File tree

228 files changed

+11186
-6756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+11186
-6756
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "CodeGen"]
2+
path = CodeGen
3+
url = https://github.com/Synergex/CodeGen.git
4+
branch = hcnet6

Application1/Application1.synproj

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="$(SolutionDir)Common.props" />
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Configuration)' == '' ">x86</Platform>
6+
<Name>Application1</Name>
7+
<StartupObject>&lt;Synergy Main&gt;</StartupObject>
8+
<OutputName>Application1</OutputName>
9+
<ProjectGuid>{5fae2bb6-ba77-4204-a910-4ef4d801d7e0}</ProjectGuid>
10+
<ProjectTypeGuids>{7B8CF543-378A-4EC1-BB1B-98E4DC6E6820};{BBD0F5D1-1CC4-42fd-BA4C-A96779C64378}</ProjectTypeGuids>
11+
<OutputType>application</OutputType>
12+
<DBL_qTrim>True</DBL_qTrim>
13+
<DBL_qAlign>True</DBL_qAlign>
14+
<EnableCommonProperties>True</EnableCommonProperties>
15+
<CommonPropertiesFileLocation>$(SolutionDir)Common.props</CommonPropertiesFileLocation>
16+
<RootNamespace>Application1</RootNamespace>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
19+
<IncludeDebugInformation>true</IncludeDebugInformation>
20+
<OutputPath>$(SolutionDir)\$(Configuration)\$(Platform)</OutputPath>
21+
<UnevaluatedOutputPath>EXEDIR:</UnevaluatedOutputPath>
22+
<PlatformTarget>x86</PlatformTarget>
23+
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
24+
<DebugOptimize>Debug</DebugOptimize>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
27+
<IncludeDebugInformation>true</IncludeDebugInformation>
28+
<OutputPath>$(SolutionDir)\$(Configuration)\$(Platform)</OutputPath>
29+
<UnevaluatedOutputPath>EXEDIR:</UnevaluatedOutputPath>
30+
<PlatformTarget>x64</PlatformTarget>
31+
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
32+
<DebugOptimize>Debug</DebugOptimize>
33+
</PropertyGroup>
34+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
35+
<IncludeDebugInformation>true</IncludeDebugInformation>
36+
<OutputPath>$(SolutionDir)\$(Configuration)\$(Platform)</OutputPath>
37+
<UnevaluatedOutputPath>EXEDIR:</UnevaluatedOutputPath>
38+
<PlatformTarget>x86</PlatformTarget>
39+
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
40+
<DebugOptimize>Optimize</DebugOptimize>
41+
</PropertyGroup>
42+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
43+
<IncludeDebugInformation>true</IncludeDebugInformation>
44+
<OutputPath>$(SolutionDir)\$(Configuration)\$(Platform)</OutputPath>
45+
<UnevaluatedOutputPath>EXEDIR:</UnevaluatedOutputPath>
46+
<PlatformTarget>x64</PlatformTarget>
47+
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
48+
<DebugOptimize>Optimize</DebugOptimize>
49+
</PropertyGroup>
50+
<ItemGroup>
51+
<Compile Include="Program.dbl" />
52+
</ItemGroup>
53+
<Import Project="$(MSBuildExtensionsPath)\Synergex\dbl\Synergex.SynergyDE.Traditional.targets" />
54+
<PropertyGroup>
55+
<PreBuildEvent>
56+
</PreBuildEvent>
57+
<PostBuildEvent>
58+
</PostBuildEvent>
59+
</PropertyGroup>
60+
</Project>

CodeGen

Submodule CodeGen added at aa33d6d

DataGenerator/DataGenerator.synproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="$(SolutionDir)Common.props" />
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net5.0</TargetFramework>
66
<DefaultLanguageSourceExtension>.dbl</DefaultLanguageSourceExtension>
77
<EnableDefaultItems>false</EnableDefaultItems>
88
<Name>DataGenerator</Name>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
public class CustomODataGenerator : ODataGenerator
3+
{
4+
public override void ApplyDefaults(Solution solution)
5+
{
6+
7+
}
8+
9+
public override List<string> ValidateSolution(Solution solution)
10+
{
11+
return new List<string>();
12+
}
13+
14+
public override List<CodeGenTask> GenerateTasks(Solution solution)
15+
{
16+
var baseTasks = base.GenerateTasks(solution);
17+
baseTasks.Add(StructureTaskHelper(solution, "Generate controller properties partial classes", solution.ControllersNamespace, solution.ControllersFolder, false, nameof(ODataGenerator), new string[] { "ODataControllerPropertyEndpoints" }, null));
18+
return baseTasks;
19+
}
20+
}
21+
22+
new CustomODataGenerator()

Harmony.AspNetCore/Context/IMultiTenantMiddleware.dbl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ namespace Harmony.AspNetCore.Context
3030
public static extension method UseMultiTenancy, @IApplicationBuilder
3131
builder, @IApplicationBuilder
3232
identifier, @Func<HttpContext, string>
33-
proc
34-
builder.Use(lambda(context, next) { InvokeMiddleware(identifier, context, next) })
33+
proc
34+
lambda implementation(context, next)
35+
begin
36+
mreturn InvokeMiddleware(identifier, context, next)
37+
end
38+
39+
data implementationInstance, @Func<HttpContext, Func<Task>, Task>, implementation
40+
41+
builder.Use(implementationInstance)
3542
mreturn builder
3643
endmethod
3744
endclass

Harmony.AspNetCore/Harmony.AspNetCore.synproj

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="restore;Build">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFramework>net6.0</TargetFramework>
44
<DefaultLanguageSourceExtension>.dbl</DefaultLanguageSourceExtension>
55
<EnableDefaultItems>false</EnableDefaultItems>
66
<Name>Harmony.AspNetCore</Name>
@@ -39,9 +39,15 @@
3939
</PropertyGroup>
4040
<ItemGroup>
4141
<FrameworkReference Include="Microsoft.AspNetCore.App" />
42-
<PackageReference Include="Synergex.SynergyDE.Build" Version="11.1.1070.3107" />
43-
<PackageReference Include="Synergex.SynergyDE.synrnt" Version="11.1.1070" />
44-
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
42+
<PackageReference Include="Synergex.SynergyDE.Build">
43+
<Version>22.8.1287</Version>
44+
</PackageReference>
45+
<PackageReference Include="Synergex.SynergyDE.synrnt">
46+
<Version>12.1.1.3278</Version>
47+
</PackageReference>
48+
<PackageReference Include="System.ComponentModel.Annotations">
49+
<Version>5.0.0</Version>
50+
</PackageReference>
4551
</ItemGroup>
4652
<ItemGroup>
4753
<Compile Include="Context\IContextMiddleware.dbl" />

Harmony.Core.AspNetCore.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</dependencies>
1515
</metadata>
1616
<files>
17-
<file src="Harmony.AspNetCore\bin\Release\netcoreapp3.1\Harmony.AspNetCore.dll" target="lib\netcoreapp3.1\Harmony.AspNetCore.dll" />
18-
<file src="Harmony.AspNetCore\bin\Release\netcoreapp3.1\Harmony.AspNetCore.pdb" target="lib\netcoreapp3.1\Harmony.AspNetCore.pdb" />
17+
<file src="Harmony.AspNetCore\bin\Release\net6.0\Harmony.AspNetCore.dll" target="lib\net6.0\Harmony.AspNetCore.dll" />
18+
<file src="Harmony.AspNetCore\bin\Release\net6.0\Harmony.AspNetCore.pdb" target="lib\net6.0\Harmony.AspNetCore.pdb" />
1919
<file src="Harmony.AspNetCore\**\*.dbl" target="src\Harmony.AspNetCore\" />
2020
</files>
2121

Harmony.Core.CodeGen.json

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
{
2+
"CreatedWithToolVersion": "1.0",
3+
"WrittenWithToolVersion": "1.0",
4+
"RPSMFIL": "HarmonyCore.Test.Repository\\bin\\Debug\\rpsmain.ism",
5+
"RPSTFIL": "HarmonyCore.Test.Repository\\bin\\Debug\\rpstext.ism",
6+
"RepositoryProject": "HarmonyCore.Test.Repository\\HarmonyCore.Test.Repository.synproj",
7+
"EnableNewtonsoftJson": true,
8+
"TraditionalBridge": {
9+
"XFServerSMCPath": "XfplEnvironment\\smc.xml"
10+
},
11+
"ServicesNamespace": "Services",
12+
"ControllersNamespace": "Services.Controllers",
13+
"ModelsNamespace": "Services.Models",
14+
"ClientModelsNamespace": "Services.Test.Models",
15+
"UnitTestsNamespace": "Services.Test.UnitTests",
16+
"UnitTestsBaseNamespace": "Services.Test",
17+
"SelfHostNamespace": "Services.Host",
18+
"TraditionalBridgeNamespace": "TraditionalBridge",
19+
"DataFolder": "SampleData",
20+
"APIDocsPath": "api-docs",
21+
"APITitle": "Harmony Core Sample API",
22+
"APIVersion": "1",
23+
"APIDescription": "This environment presents an example of using Harmony Core to expose a collection of RESTful Web Service endpoints that allow you to interact with a small sample dataset.",
24+
"APITerms": "Open Source",
25+
"APIContactName": "Jodah Veloper",
26+
"APIContactEmail": "[email protected]",
27+
"APILicenseName": "BSD-2-Clause",
28+
"APILicenseUrl": "https://opensource.org/licenses/BSD-2-Clause",
29+
"APIEnableQueryParams": "(MaxExpansionDepth=4)",
30+
"ServerName": "localhost",
31+
"ServerHttpPort": "8085",
32+
"ServerHttpsPort": "8086",
33+
"ServerBasePath": "odata",
34+
"OAuthServer": "http://localhost:5000",
35+
"OAuthApi": "api1",
36+
"OAuthClient": "ro.client",
37+
"OAuthSecret": "CBF7EBE6-D46E-41A7-903B-766A280616C3",
38+
"OAuthTestUser": "jodah",
39+
"OAuthTestPassword": "P@ssw0rd",
40+
"CustomAuthController": "Authentication",
41+
"CustomAuthEndpointPath": "GetToken",
42+
"CustomAuthUserName": "username",
43+
"CustomAuthPassword": "password",
44+
"SignalRPath": "/hub/radley",
45+
"TemplatesFolder": "Templates",
46+
"ServicesFolder": "Services",
47+
"ControllersFolder": "Services.Controllers",
48+
"ModelsFolder": "Services.Models",
49+
"SelfHostFolder": "Services.Host",
50+
"UnitTestFolder": "Services.Test",
51+
"IsolatedFolder": "Isolated",
52+
"TraditionalBridgeFolder": "TraditionalBridge",
53+
"ServicesProject": "Services",
54+
"ControllersProject": "Services.Controllers",
55+
"ModelsProject": "Services.Models",
56+
"SelfHostProject": "Services.Host",
57+
"UnitTestProject": "Services.Test",
58+
"IsolatedProject": "Isolated",
59+
"TraditionalBridgeProject": "TraditionalBridge",
60+
"FullCollectionEndpoints": true,
61+
"PrimaryKeyEndpoints": true,
62+
"AlternateKeyEndpoints": true,
63+
"CollectionCountEndpoints": true,
64+
"PutEndpoints": true,
65+
"PostEndpoints": true,
66+
"PatchEndpoints": true,
67+
"DeleteEndpoints": true,
68+
"ODataSelect": true,
69+
"ODataFilter": true,
70+
"ODataOrderBy": true,
71+
"ODataTop": true,
72+
"ODataSkip": true,
73+
"ODataRelations": true,
74+
"ODataRelationValidation": true,
75+
"GenerateSelfHost": true,
76+
"CreateTestFiles": true,
77+
"GeneratePostmanTests": true,
78+
"GenerateUnitTests": true,
79+
"GenerateOData": true,
80+
"AdapterRouting": true,
81+
"StoredProcedureRouting": true,
82+
"FieldOverlays": true,
83+
"ExtendedStructures": [
84+
{
85+
"Name": "CUSTOMERS",
86+
"EnabledGenerators": [
87+
"ModelGenerator",
88+
"ODataGenerator",
89+
"EFCoreGenerator"
90+
],
91+
"RelationsSpecs": [
92+
{
93+
"FromStructure": "CUSTOMERS",
94+
"FromKey": "CUSTOMER_NUMBER",
95+
"ToStructure": "ORDERS",
96+
"ToKey": "CUSTOMER_NUMBER",
97+
"RelationName": "CustomerOrders",
98+
"RequiresMatch": false,
99+
"ValidationMode": "None",
100+
"BackRelation": "ORDERS-CUSTOMERS-CUSTOMER_NUMBER-CUSTOMER_NUMBER",
101+
"RelationType": "D",
102+
"CustomValidatorName": ""
103+
},
104+
{
105+
"FromStructure": "CUSTOMERS",
106+
"FromKey": "FAVORITE_ITEM",
107+
"ToStructure": "ITEMS",
108+
"ToKey": "ITEM_NUMBER",
109+
"RelationName": "CustomerFavoriteItem",
110+
"RequiresMatch": false,
111+
"ValidationMode": "ValuePresent",
112+
"BackRelation": "ITEMS-CUSTOMERS-ITEM_NUMBER-FAVORITE_ITEM",
113+
"RelationType": "C",
114+
"CustomValidatorName": ""
115+
},
116+
{
117+
"FromStructure": "CUSTOMERS",
118+
"FromKey": "CUSTOMER_NUMBER",
119+
"ToStructure": "CUSTOMER_NOTES",
120+
"ToKey": "CUSTOMER_NUMBER",
121+
"RelationName": "CustomerNotes",
122+
"RequiresMatch": false,
123+
"ValidationMode": "None",
124+
"BackRelation": "CUSTOMER_NOTES-CUSTOMERS-CUSTOMER_NUMBER-CUSTOMER_NUMBER",
125+
"RelationType": "D",
126+
"CustomValidatorName": ""
127+
}
128+
]
129+
},
130+
{
131+
"Name": "CUSTOMER_NOTES",
132+
"EnabledGenerators": [
133+
"ModelGenerator",
134+
"ODataGenerator",
135+
"EFCoreGenerator"
136+
]
137+
},
138+
{
139+
"Name": "ITEMS",
140+
"EnabledGenerators": [
141+
"ModelGenerator",
142+
"ODataGenerator",
143+
"EFCoreGenerator"
144+
]
145+
},
146+
{
147+
"Name": "ORDERS",
148+
"EnabledGenerators": [
149+
"ModelGenerator",
150+
"ODataGenerator",
151+
"EFCoreGenerator"
152+
]
153+
},
154+
{
155+
"Name": "ORDER_ITEMS",
156+
"EnabledGenerators": [
157+
"ModelGenerator",
158+
"ODataGenerator",
159+
"EFCoreGenerator"
160+
]
161+
},
162+
{
163+
"Name": "VENDORS",
164+
"EnabledGenerators": [
165+
"ModelGenerator",
166+
"ODataGenerator",
167+
"EFCoreGenerator"
168+
]
169+
},
170+
{
171+
"Name": "CUSTOMER_EX",
172+
"EnabledGenerators": [
173+
"ModelGenerator",
174+
"ODataGenerator",
175+
"EFCoreGenerator"
176+
]
177+
},
178+
{
179+
"Name": "NONUNIQUEPK",
180+
"EnabledGenerators": [
181+
"ModelGenerator",
182+
"ODataGenerator",
183+
"EFCoreGenerator"
184+
]
185+
},
186+
{
187+
"Name": "DIFFERENTPK",
188+
"EnabledGenerators": [
189+
"ModelGenerator",
190+
"ODataGenerator",
191+
"EFCoreGenerator"
192+
]
193+
},
194+
{
195+
"Name": "TESTCAR",
196+
"EnabledGenerators": [
197+
"ModelGenerator",
198+
"ODataGenerator",
199+
"EFCoreGenerator"
200+
]
201+
},
202+
{
203+
"Name": "TESTCARLOT",
204+
"EnabledGenerators": [
205+
"ModelGenerator",
206+
"ODataGenerator",
207+
"EFCoreGenerator"
208+
]
209+
},
210+
{
211+
"Name": "TESTCAROWNER1",
212+
"EnabledGenerators": [
213+
"ModelGenerator",
214+
"ODataGenerator",
215+
"EFCoreGenerator"
216+
]
217+
},
218+
{
219+
"Name": "TESTCAROWNER2",
220+
"EnabledGenerators": [
221+
"ModelGenerator",
222+
"ODataGenerator",
223+
"EFCoreGenerator"
224+
]
225+
},
226+
{
227+
"Name": "TESTCAROWNER3",
228+
"EnabledGenerators": [
229+
"ModelGenerator",
230+
"ODataGenerator",
231+
"EFCoreGenerator"
232+
]
233+
}
234+
],
235+
"ExtendedInterfaces": []
236+
}

0 commit comments

Comments
 (0)