The latest release of code generator has resolved the issue of "Access Denied" that has been experienced by some users trying to install the code generation library or to register a premium projects subscription.
New typeConstructor element allows to generate a static or shared constructor for a type. For example, you can declare the following type member in a class:
<typeConstructor> <statements> <assignStatement> <fieldReferenceExpression name="typeMap"/> <objectCreateExpression type="SortedDictionary"> <typeArguments> <typeReference type="System.String"/> <typeReference type="Type"/> </typeArguments> </objectCreateExpression> </assignStatement> </statements> </typeConstructor>
This will result in the following code being generated.
C#:
static Controller() { _typeMap = new SortedDictionary<string, Type>(); }
VB.NET:
Shared Sub New() m_TypeMap = New SortedDictionary(Of String, Type)() End Sub
There were also minor code generator changes that allow to skip target definition in delegateCreateExpression and eventReferenceExpression elements. The missing target is automatically defaulted to thisReferenceExpression.
Project descriptor CodeOnTime.Project.xml file now supports two additional elements in the information section. You can supply a link to a live demo application and a link to a detailed project description. Here is a snippet from the project descriptor of Data Aquarium Framework code generator project.
<information> <product>COT200805-DA</product> <title>Data Aquarium Framework</title> ....... <website>http://www.codeontime.com</website> <about>http://www.codeontime.com/productsdaf.aspx</about> <demo>http://dev.codeontime.com/demo/northwind</demo> </information>