Run Time Record Class Examples
From the version 1.6.0 you can use the new RuntimeRecords, this was one of the most requested features and the most fun to write because I need a clear API and that can be expended in the future other adds (XML backends, easy CSV records, etc).
I hope that you like the way that I use to implement them and ofcourse that any suggestion is welcome.
The most importat is that you have a lot of ways to create or load your record class at runtime:
- The best of all: using the ClassBuilder !!
- From an XML file generated with the Wizard or saved with the SaveXml method of the ClassBuilder
- From a string with the source of the class
- From a file with the source of the class
- From a encripted file with the source of the class
- From a assebly loaded at runtime that contains the class (next version)
And now some examples of the basic methods:
Note: Your need to import the namespace FileHelpers.RunTime
Using the CodeBuilder (FixedLength)
Using the CodeBuilder (Delimited)
Form an Xml File generated with the Wizard or saved from a ClassBuilder
Form a string with the source of the record class.
Form a file with the source of the record class.
Form a encripted source file of the record class.
The idea of the encripted file is not security (you can found the keyphrase in the code)
This only aims to hide to end users part of your code and so they don't touch it =)
Must Read - Quick Start Guide - Attributes
List - F.A.Q. - Examples of
Use - Contacts & Credits - Donations