1

Resolved

Template compilation error using generics in "property" directive

description

Hi, I think i've found a bug when using generic types with more than one type in "property" directives.
 
i.e.
 
<#@ property name="Columnas" type="System.Collections.Generic.Dictionary<String,String>" processor="PropertyProcessor" #>
 
This causes a TextTransformationException. Looking at the TemplateClass member of the exception I can see that the type name of the generic property has been truncated:
 
....
 
private System.Collections.Generic.Dictionary<String _Columnas;
 
public virtual System.Collections.Generic.Dictionary<String Columnas
{
 
....
 
Browsing the sources I've noticed you are discarding all text after the first comma in the type name (in TemplateArgumentProcessor.NormalizeType), which is causing this (unexpected) behaviour.
 
Anyway I'm very grateful for this library. I'm saving lots of time thanks to it!

comments

TimCools wrote Aug 17, 2009 at 1:01 PM

I discard all text after the first comma because I want to remove assembly, etc from fully qualified names. This method should take in account generic parameters. I will fix this and keep you informed.

Thanks for your response, I'm glad you like the library!

wrote Aug 17, 2009 at 2:43 PM

wrote Sep 1, 2009 at 8:01 PM

wrote Feb 13, 2013 at 8:23 PM

wrote May 15, 2013 at 1:40 AM

wrote May 15, 2013 at 1:40 AM

wrote Jun 12, 2013 at 1:07 AM