TextEngine.x86 1.2.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package TextEngine.x86 --version 1.2.3.1
                    
NuGet\Install-Package TextEngine.x86 -Version 1.2.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TextEngine.x86" Version="1.2.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TextEngine.x86" Version="1.2.3.1" />
                    
Directory.Packages.props
<PackageReference Include="TextEngine.x86" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TextEngine.x86 --version 1.2.3.1
                    
#r "nuget: TextEngine.x86, 1.2.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TextEngine.x86@1.2.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TextEngine.x86&version=1.2.3.1
                    
Install as a Cake Addin
#tool nuget:?package=TextEngine.x86&version=1.2.3.1
                    
Install as a Cake Tool

Nuget

Installation

Install-Package TextEngine.x86

Template Engine Usage

            TextEvulator evulator = new TextEvulator();
            Dictionary<string, object> data = new Dictionary<string, object>();
            data["is_loaded"] = true;
            data["str_data"] = "string data";
            data["int_data"] = 12345;
            //User can change Left and Right tag.
            //evulator.LeftTag = '[';
            //evulator.RightTag = ']';
            evulator.GlobalParameters = data;
            evulator.Text = "{if is_loaded}Loaded{/if} string data: {%str_data}, int data: {%int_data}";
            //Parse content.
            evulator.Parse();
            //Evulate all.
            var result = evulator.Elements.EvulateValue();
            //Output: Loaded string data: string data, int data: 12345
            string resultStr = result?.TextContent;

ParFormat Usage

            //Long usage
            ParFormat pf = new ParFormat();
            Dictionary<string, object> kv = new Dictionary<string, object>();
            kv["name"] = "MacMillan";
            kv["grup"] = "AR-GE";
            kv["random"] = (Func<int>)delegate () {
                return new Random().Next(1, 100);
            };
            pf.SurpressError = true;
            pf.Text = "User: {%name}, Group: {%grup}, Random Number: {%random()}";

            //Short usage
            ParFormat.Format("User: {%name}, Group: {%grup}, Number Sayı: {%random()}", kv);


            //Output  User: MacMillan, Group: AR-GE, Random Number: 61
            string res = pf.Apply(kv);

Evulators

NoPrintEvulator

            TextEvulator evulator = new TextEvulator();
            //NoPrint inner is evulated bu not print to result.
			evulator.Text = "{NOPRINT}.............{/NOPRINT}";

CM(Call Macro)Evulator and MacroEvulator

            TextEvulator evulator = new TextEvulator();
            //evulator.Text = "{noprint}{macro name=macroname}{/macro}{noprint}{cm macroname}";
            evulator.ParamNoAttrib = true;
            evulator.Text = "{noprint}{macro name=macro1}This is macro line, param1: {%param1}, param2: {%param2}\r\n{/macro}{/noprint} {cm macro1}{cm macro1 param1=\"'test'\" param2=123456}";
            evulator.Parse();
            //Output: This is macro line, param1: , param2: \r\nThis is macro line, param1: test, param2: 123456\r\n
            string result = evulator.Elements.EvulateValue()?.TextContent;

ForEvulator, ContinueEvulator And BreakEvulator Usage

            TextEvulator evulator = new TextEvulator();
            //evulator.Text = "{FOR var=i start=0 step=1 to=5}Current Step: {%i}{/FOR}";
            Dictionary<string, object> kv = new Dictionary<string, object>();
            kv["name"] = "TextEngine";
            evulator.GlobalParameters = kv;
            evulator.Text = "{FOR var=i start=0 step=1 to='name.Length'}{%name[i]}{if i == 4}{continue}{/if}{if i==7}{break}{/if}-{/FOR}";
            evulator.ParamNoAttrib = true;
            evulator.Parse();
            //Output: "T-e-x-t-En-g-i"
            string result = evulator.Elements.EvulateValue()?.TextContent;

ForeachEvulator Usage

            TextEvulator evulator = new TextEvulator();
            //evulator.Text = "{FOREACH var=item in=list}{/FOR}";
            Dictionary<string, object> kv = new Dictionary<string, object>();
            kv["list"] = new List<string> { "item1", "item2", "item3" };
            evulator.GlobalParameters = kv;
            evulator.Text = "{FOREACH var=current in=list}{%current}\r\n{/FOREACH}";
            evulator.ParamNoAttrib = true;
            evulator.Parse();
            //Output: item1\r\nitem2\r\nitem3\r\n
            string result = evulator.Elements.EvulateValue()?.TextContent;

IfEvulator Usage

			TextEvulator evulator = new TextEvulator();
            //evulator.Text = "{IF statement}true{elif statement}elif true{/elif}{else}false{/IF}";
            Dictionary<string, object> kv = new Dictionary<string, object>();
            kv["status"] = 3;
            evulator.GlobalParameters = kv;
            evulator.ParamNoAttrib = true;
            evulator.Text = "{IF status==1}status = 1{ELIF status == 2}status = 2 {ELSE}status on else, value: {%status}{/IF}";
            evulator.Parse();
            //Output: status on else, value: 3
            string result = evulator.Elements.EvulateValue()?.TextContent;

IncludeEvulator Usage

			TextEvulator evulator = new TextEvulator();
            evulator.Text = "{include name=\"'path'\" xpath='optional' parse='true or false(as text)'";
			evulator.Parse();
            string result = evulator.Elements.EvulateValue()?.TextContent;

RepeatEvulator Usage

            TextEvulator evulator = new TextEvulator();
            evulator.Text = "{repeat current_repeat='cur' count=2}Current Repat: {%cur}{if cur == 0}-{/if}{/repeat}";
            evulator.Parse();
            //Output: "Current Repat: 0-Current Repat: 1"
            string result = evulator.Elements.EvulateValue()?.TextContent;

ReturnEvulator Usage

            TextEvulator evulator = new TextEvulator();
            evulator.Text = "Test variable, test variable 2 {if !test}{return}{/if} test variable 3";
            evulator.Parse();
            //Output: Test variable, test variable 2 
            string result = evulator.Elements.EvulateValue()?.TextContent;

SetEvulator And UnsetEvulator

            TextEvulator evulator = new TextEvulator();
            Dictionary<string, object> kv = new Dictionary<string, object>();
            kv["status"] = true;
            kv["total"] = 5;
            evulator.GlobalParameters = kv;
            evulator.Text = "{set if=status name=variable value='total * 2'} variable is: {%variable}, {unset name=variable}\r\nvariable is: {%variable}";
            evulator.ParamNoAttrib = true;
            evulator.Parse();
            //Output: " variable is: 10, \r\nvariable is: "
            string result = evulator.Elements.EvulateValue()?.TextContent;

SwitchEvulator

            TextEvulator evulator = new TextEvulator();
            Dictionary<string, object> kv = new Dictionary<string, object>();
            kv["total"] = 2;
            evulator.GlobalParameters = kv;
            evulator.Text = @"{switch c=total}
                                {case v=1}Value 1{/case}
                                {case v=2}Value 2{/case}
                                {default}Default Value{/default}
                                {/switch}";
            evulator.ParamNoAttrib = true;
            evulator.Parse();
            //Output: Value 2
            string result = evulator.Elements.EvulateValue()?.TextContent;
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 is compatible.  netcoreapp3.1 is compatible. 
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 2.2

    • No dependencies.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • net5.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TextEngine.x86:

Package Downloads
TextEngine.BBCode.x86

BBCode converter extension for TextEngine

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.2.5 679 7/24/2022
1.5.2.4 669 2/20/2022
1.5.1.1 653 1/26/2022
1.5.1 658 1/24/2022
1.5.0 2,320 5/26/2021
1.4.3.2 844 5/22/2021
1.4.3.1 752 5/18/2021
1.4.3 899 5/18/2021
1.4.2.3 735 5/18/2021
1.4.2.2 659 5/17/2021
1.4.2 621 5/16/2021
1.4.0 610 5/16/2021
1.3.2.1 662 5/12/2021
1.3.1 550 5/6/2021
1.3.0 517 5/4/2021
1.2.3.1 611 3/30/2021
1.2.2.1 714 3/21/2021
1.2.2 564 3/19/2021

.Net changed GloblaParameters name to GlobalParamaters name from TextEvulator
     .Net fixed NameEquals on TextElement.
     .Net fixed ForEvulator
     Fixed & and | operator only returned true and false

     Added EvulateValue function to TextEvulator class
     Added NeedParse property to TextEvulator