11# MbSoftLab.TemplateEngine.Core
2+
3+ ![ BuildFromDevelop] ( https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core/workflows/BuildFromDevelop/badge.svg?branch=develop ) ![ BuildFromMaster] ( https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core/workflows/BuildFromMaster/badge.svg?branch=master ) ![ Release] ( https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core/workflows/Release/badge.svg )
4+
5+ * Codequality (master branch)*
6+ [ ![ CodeFactor] ( https://www.codefactor.io/repository/github/mbsoftlab/mbsoftlab.templateengine.core/badge )] ( https://www.codefactor.io/repository/github/mbsoftlab/mbsoftlab.templateengine.core )
7+
8+ * Codequality (develop branch)*
9+ [ ![ CodeFactor] ( https://www.codefactor.io/repository/github/mbsoftlab/mbsoftlab.templateengine.core/badge/develop )] ( https://www.codefactor.io/repository/github/mbsoftlab/mbsoftlab.templateengine.core/overview/develop )
210``` csharp
311namespace MbSoftLab .TemplateEngine .Core
412{
@@ -21,8 +29,7 @@ Also you can access parameterless public methods of TemplateDataModell classes b
2129
2230
2331The default is ` ${ ` for the start delimiter and ` } ` for the end delimiter.
24-
25- ![ picture of what can done by the TemplateEngine] ( https://mbsoftlab.bitbucket.io/MbSoftlab.TemplateEngine.Core/ProblemDescription.PNG " What the Engine can do ")
32+
2633
2734``` csharp
2835 Person person = new Person
@@ -75,6 +82,7 @@ PM> Install-Package MbSoftLab.TemplateEngine.Core
7582| ` TemplateDataModel ` | Generic / object | Modell with Properys for Dataholding |
7683| ` TemplateString ` | string | Templatestring |
7784| ` NullStringValue ` | string | String for NULL-Values |
85+ | ` CultureInfo ` | CultureInfo | Culture for Double and DateTime values |
7886
7987---
8088
@@ -85,24 +93,23 @@ PM> Install-Package MbSoftLab.TemplateEngine.Core
8593// Create a modell Class for Data
8694 TemplateDataModel templateDataModel = new TemplateDataModel
8795 {
88- ProjektName = " Projektname"
96+ ProjectName = " Projektname"
8997 };
9098
91- string template = " <MyTag>${ProjektName }</MyTag>" ;
99+ string template = " <MyTag>${ProjectName }</MyTag>" ;
92100
93101TemplateEngine templateEngine = new TemplateEngine (templateDataModel ,template );
94102string outputString = templateEngine .CreateStringFromTemplate ();
95103
96- Console .Write (outputString ); // Ausgabe : <MyTag>Projektname </MyTag>
104+ Console .Write (outputString ); // Output : <MyTag>ProjectName </MyTag>
97105```
98106### ** Load template from file**
99107``` csharp
100108 TemplateDataModel templateDataModel = new TemplateDataModel
101109 {
102- ProjektName = " Projektname" ,
103- KundeNummer = " 1234" ,
104- ProjektLink = " https://google.de" ,
105- ProjektKuerzel = " PKZL"
110+ ProjectName = " Projektname" ,
111+ CustomerId = " 1234" ,
112+ ProjectUrl = " https://google.com"
106113 };
107114
108115 TemplateEngine templateEngine = new TemplateEngine (templateDataModel );
@@ -118,9 +125,8 @@ Console.Write(outputString); // Ausgabe: <MyTag>Projektname</MyTag>
118125 TemplateDataModel templateDataModel = new TemplateDataModel
119126 {
120127 ProjectName = " Projectname" ,
121- KundeNummer = " 1234" ,
122- ProjektLink = " https://google.de" ,
123- ProjektKuerzel = " PKZL"
128+ CustomerId = " 1234" ,
129+ ProjectUrl = " https://google.com"
124130 };
125131
126132 string template = " <p>${ProjectName}</p>" ;
@@ -137,9 +143,8 @@ Console.Write(outputString); // Ausgabe: <MyTag>Projektname</MyTag>
137143 TemplateDataModel templateDataModel = new TemplateDataModel
138144 {
139145 ProjectName = " Projectname" ,
140- KundeNummer = " 1234" ,
141- ProjektLink = " https://google.de" ,
142- ProjektKuerzel = " PKZL"
146+ CustomerId = " 1234" ,
147+ ProjectUrl = " https://google.com"
143148 };
144149
145150 string template = " <p>${ProjectName}</p>" ;
@@ -153,12 +158,11 @@ Console.Write(outputString); // Ausgabe: <MyTag>Projektname</MyTag>
153158 TemplateDataModel templateDataModel = new TemplateDataModel
154159 {
155160 ProjectName = " Projectname" ,
156- KundeNummer = null ,
157- ProjektLink = " https://google.de" ,
158- ProjektKuerzel = " KZ"
161+ CustomerId = null ,
162+ ProjectUrl = " https://google.de"
159163 };
160164
161- string template = " <p>{{ProjectName}}</p><p>{{KundeNummer }}</p>" ;
165+ string template = " <p>{{ProjectName}}</p><p>{{CustomerId }}</p>" ;
162166 TemplateEngine < TemplateDataModel > templateEngine = new TemplateEngine <TemplateDataModel >()
163167 {
164168 TemplateDataModel = templateDataModel ,
@@ -202,22 +206,11 @@ Console.Write(outputString); // Ausgabe: <MyTag>Projektname</MyTag>
202206
203207---
204208
205- ## Repository
206-
207- https://bitbucket.org/MbSoftLab/mbsoftlab.templateengine/src/master/
209+ ## Repo
208210
211+ https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core
209212---
210213
211214## Issues
212215
213- [ report an issue] ( https://bitbucket.org/MbSoftLab/mbsoftlab.templateengine/issues?status=new&status=open )
214-
215-
216- ---
217- ## License
218-
219- Code licensed under [ MIT] ( https://licenses.nuget.org/MIT )
220-
221- Documentation licensed under [ CC BY 4.0.] ( https://creativecommons.org/licenses/by/4.0/ )
222-
223-
216+ [ report an issue] ( https://github.com/mbsoftlab/MbSoftLab.TemplateEngine.Core/issues )
0 commit comments