StructureConverter 1.0.0
dotnet add package StructureConverter --version 1.0.0
NuGet\Install-Package StructureConverter -Version 1.0.0
<PackageReference Include="StructureConverter" Version="1.0.0" />
<PackageVersion Include="StructureConverter" Version="1.0.0" />
<PackageReference Include="StructureConverter" />
paket add StructureConverter --version 1.0.0
#r "nuget: StructureConverter, 1.0.0"
#:package StructureConverter@1.0.0
#addin nuget:?package=StructureConverter&version=1.0.0
#tool nuget:?package=StructureConverter&version=1.0.0
Converts a Mainframe structure that is saved as a txt file and converts it into a Dictionary object that can be used in a C# application.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net45 is compatible. net451 was computed. net452 was computed. 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. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
Converts a Mainframe structure that is saved as a txt file and converts it into a Dictionary object that can be used in a C# application.
1) FTP mainframe structures to the lan and save as txt.
2) Create an ini file inside the debug folder in your C# application.
- Open the ini file and set the file path of your structure(s)
- For input structures the naming scheme is: input_StructName = filePath\fileName.txt
- For output structures the naming scheme is: output_StructName = filePath\fileName.txt
- NOTE: you can have multiple structures declared in the ini file for both input and output.
- When you are done, save your ini file the same name as your projects executable.
3) Inside of your project add a ref to the package.
4) After adding the ref go to the class where your app launches from.
- Add "using StructureConverter" in your main class.
- Inside the startup step create a new instance of StructureConverter and select the appropriate creation method for your structures.
5) Using your created structure
- Create a new Dictionary object
- Set the Dictionary object equal to the StructureConverter class and the static property that pertains to the structure you want to access.
- After selecting the right property pass the input/output structure name you created in your ini file as a [key] as a type string.
- ex. StructureConverter.OutputStructures["output_TEST"]
- When you want to get the value of particular field you just need to pass the fieldName as a key on your Dictionary object;
6) When moving to production remember to copy the ini file to the prod environment.
WARNING: When trying to create a new dictionary and set it equal to a dictionary that was created from a static property it will create a reference of the
dictionary and change the data inside of the static property.
To create a copy of dictionary that was created from a static property use a foreach loop on the keys of the dictionary.