WayneBrantley wrote:
Otis,
I have my first LPT template working. I have most things firgured out. Few questions:
1) where is UsePartialClass setting was located/stored.
It's a setting in the task definition, thus a parameter for the dotnettemplateengine.
This is currently a bit of a 'hack', in v2 this is all redesigned to be much more flexible. Till then, you've to define it on the task.
2) where is the UseCamelCase setting located/stored (shouldn't I respect that setting in my template - and shouldn't there be some built in function like FormatIdentifier(blah)?)
What 'usecamelcase' setting are you referring to?
3) I guess intellisense is not supposed to work fully?
foreach( SPCallParameterDefinition pi in Parameters )
{
pi. <---no intellisense on this variable.
string. <---this does have intellisense
}
Correct, very basic intellisense is implemented, it's not that easy .
Also, since everything has to be coded in each template, seems like everywhere you end up writing some of the same functions - would be good to have those in some new global helper routine.
You can just add the code to an assembly and reference that in the template I think that's the easiest.
Also, one other side note - the SPParameterDBTypeAsString property of a parameter returns the type with a lowercase like, 'int', so SqlDbType.int will not work - so here we have to 'Pascal' case this. Seems like a lot of things like that going on.
But, hey - it is working!
You should use that one, you should use this:
string providerTypeName = project.DatabaseDriver.DBType2DBNETProviderType( spCallParameter.RelatedParameter.TypeDefinition.DBType);