Skip to content

Commit fed9737

Browse files
committed
Decouple source generation from NHapi.Base
* Create new project and move source generating source code to it
1 parent bcd4774 commit fed9737

33 files changed

+3855
-3809
lines changed

Hl7Models.sln

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHapi.NUnit", "tests\NHapi.
1919
EndProject
2020
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHapi.Model.V25", "src\NHapi.Model.V25\NHapi.Model.V25.csproj", "{BE6CDFAD-560E-44CC-B23B-87252DD4392C}"
2121
EndProject
22-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModelGenerator", "src\ModelGenerator\ModelGenerator.csproj", "{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617}"
23-
EndProject
2422
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHapi.Model.V22_ZSegments", "src\NHapi.Model.V22_ZSegments\NHapi.Model.V22_ZSegments.csproj", "{FFECB4DE-C192-4F95-9DC7-9D0A815D250A}"
2523
EndProject
2624
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHapi.Model.V251", "src\NHapi.Model.V251\NHapi.Model.V251.csproj", "{616C84EF-BE12-47A8-A524-D8230D572163}"
@@ -86,10 +84,6 @@ Global
8684
{BE6CDFAD-560E-44CC-B23B-87252DD4392C}.Debug|Any CPU.Build.0 = Debug|Any CPU
8785
{BE6CDFAD-560E-44CC-B23B-87252DD4392C}.Release|Any CPU.ActiveCfg = Release|Any CPU
8886
{BE6CDFAD-560E-44CC-B23B-87252DD4392C}.Release|Any CPU.Build.0 = Release|Any CPU
89-
{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
90-
{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617}.Debug|Any CPU.Build.0 = Debug|Any CPU
91-
{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617}.Release|Any CPU.ActiveCfg = Release|Any CPU
92-
{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617}.Release|Any CPU.Build.0 = Release|Any CPU
9387
{FFECB4DE-C192-4F95-9DC7-9D0A815D250A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
9488
{FFECB4DE-C192-4F95-9DC7-9D0A815D250A}.Debug|Any CPU.Build.0 = Debug|Any CPU
9589
{FFECB4DE-C192-4F95-9DC7-9D0A815D250A}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -135,7 +129,6 @@ Global
135129
{4B3417BA-0090-4FA0-B04B-BB19563FC11C} = {9FC71692-FA33-4213-8323-E53688BCA633}
136130
{7C7C99F0-672B-4DB1-A125-5ED7A3ADF95E} = {65FE0FF9-296E-4C9B-A670-05D7AC663569}
137131
{BE6CDFAD-560E-44CC-B23B-87252DD4392C} = {9FC71692-FA33-4213-8323-E53688BCA633}
138-
{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617} = {9FC71692-FA33-4213-8323-E53688BCA633}
139132
{FFECB4DE-C192-4F95-9DC7-9D0A815D250A} = {9FC71692-FA33-4213-8323-E53688BCA633}
140133
{616C84EF-BE12-47A8-A524-D8230D572163} = {9FC71692-FA33-4213-8323-E53688BCA633}
141134
{A21B73C4-D18E-4BBA-BE6C-FD52A1F5F6C9} = {9FC71692-FA33-4213-8323-E53688BCA633}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This repository is now actively maintained as of 10/21/2020.
44

55
# nHapi
6-
NHapi is a .NET port of the original Java project [HAPI](http://hl7api.sourceforge.net/).
6+
NHapi is a .NET port of the original Java project [HAPI](https://github.com/hapifhir/hapi-hl7v2).
77

88
NHapi allows Microsoft .NET developers to easily use an HL7 2.x object model. This object model allows for parsing and encoding HL7 2.x data to/from Pipe Delimited or XML formats. A very handy program for use in the health care industry.
99

@@ -20,7 +20,7 @@ This project is **NOT** affiliated with the HL7 organization. This software just
2020

2121
## Requirements
2222

23-
NHapi currently targets version 3.5 of the .NET Framework
23+
NHapi currently targets version 3.5 of the .NET Framework and netstandard2.0
2424

2525
## Getting Started
2626

nHapi.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2020
README.md = README.md
2121
EndProjectSection
2222
EndProject
23+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHapi.SourceGeneration", "src\NHapi.SourceGeneration\NHapi.SourceGeneration.csproj", "{D9A637CE-C1B6-499C-B81B-82AE30580394}"
24+
EndProject
2325
Global
2426
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2527
Debug|Any CPU = Debug|Any CPU
@@ -38,6 +40,10 @@ Global
3840
{7216E533-4B1E-476B-9E9A-0982F166FECD}.Debug|Any CPU.Build.0 = Debug|Any CPU
3941
{7216E533-4B1E-476B-9E9A-0982F166FECD}.Release|Any CPU.ActiveCfg = Release|Any CPU
4042
{7216E533-4B1E-476B-9E9A-0982F166FECD}.Release|Any CPU.Build.0 = Release|Any CPU
43+
{D9A637CE-C1B6-499C-B81B-82AE30580394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44+
{D9A637CE-C1B6-499C-B81B-82AE30580394}.Debug|Any CPU.Build.0 = Debug|Any CPU
45+
{D9A637CE-C1B6-499C-B81B-82AE30580394}.Release|Any CPU.ActiveCfg = Release|Any CPU
46+
{D9A637CE-C1B6-499C-B81B-82AE30580394}.Release|Any CPU.Build.0 = Release|Any CPU
4147
EndGlobalSection
4248
GlobalSection(SolutionProperties) = preSolution
4349
HideSolutionNode = FALSE
@@ -46,6 +52,7 @@ Global
4652
{5A080123-0597-46C3-AE78-2007EFB0DD68} = {D4B8E273-F9BA-459F-8489-87420B160690}
4753
{EBB8E9C9-7FF2-49C4-96EF-C5B87E4C2617} = {D4B8E273-F9BA-459F-8489-87420B160690}
4854
{7216E533-4B1E-476B-9E9A-0982F166FECD} = {3F799636-AB73-4BBF-BA54-66E3C0FF7849}
55+
{D9A637CE-C1B6-499C-B81B-82AE30580394} = {D4B8E273-F9BA-459F-8489-87420B160690}
4956
EndGlobalSection
5057
GlobalSection(ExtensibilityGlobals) = postSolution
5158
SolutionGuid = {D05CB0C7-76FB-4E93-AFBD-16CF7ACD5F87}

nHapi.suo

-30.5 KB
Binary file not shown.

src/ModelGenerator/ModelBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using System.Configuration;
3-
using NHapi.Base;
4-
using NHapi.Base.SourceGeneration;
5-
using ConfigurationSettings = NHapi.Base.ConfigurationSettings;
3+
using NHapi.SourceGeneration;
4+
using NHapi.SourceGeneration.Generators;
5+
using ConfigurationSettings = NHapi.SourceGeneration.ConfigurationSettings;
66

77
namespace ModelGenerator
88
{

src/ModelGenerator/ModelGenerator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<ProjectReference Include="..\NHapi.Base\NHapi.Base.csproj" />
34+
<ProjectReference Include="..\NHapi.SourceGeneration\NHapi.SourceGeneration.csproj" />
3535
</ItemGroup>
3636

3737
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">

src/NHapi.Base/HL7Exception.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/// 2001. All Rights Reserved.
1212
/// Contributor(s): ______________________________________.
1313
/// Alternatively, the contents of this file may be used under the terms of the
14-
/// GNU General Public License (the GPL), in which case the provisions of the GPL are
14+
/// GNU General Public License (the GPL), in which case the provisions of the GPL are
1515
/// applicable instead of those above. If you wish to allow use of your version of this
1616
/// file only under the terms of the GPL and not to allow others to use your version
1717
/// of this file under the MPL, indicate your decision by deleting the provisions above

src/NHapi.Base/NHapi.Base.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
2020
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
21-
<PackageReference Include="System.Data.Odbc" Version="4.7.0" />
2221
</ItemGroup>
2322

2423
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
@@ -27,7 +26,7 @@
2726

2827
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
2928
<Reference Include="System" />
30-
<Reference Include="System.configuration" />
29+
<Reference Include="System.Configuration" />
3130
<Reference Include="System.Data" />
3231
<Reference Include="System.Xml" />
3332
</ItemGroup>

src/NHapi.Base/Parser/DefaultModelClassFactory.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using System.Threading;
99
using NHapi.Base;
1010
using NHapi.Base.Model;
11-
using NHapi.Base.SourceGeneration;
1211
using NHapi.Base.Log;
1312
using NHapi.Base.Model.Configuration;
1413

src/NHapi.Base/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414

1515
// The following GUID is for the ID of the typelib if this project is exposed to COM
1616

17-
[assembly: Guid("fb32b28b-416b-4145-992b-824afe2eb911")]
17+
[assembly: Guid("fb32b28b-416b-4145-992b-824afe2eb911")]
18+
[assembly: InternalsVisibleTo("NHapi.SourceGeneration")]

0 commit comments

Comments
 (0)