Partial Class Setting

Posts   
 
    
Posts: 1263
Joined: 10-Mar-2006
# Posted on: 17-Mar-2006 01:00:22   

Otis, I have my first LPT template working. I have most things firgured out. Few questions:

1) where is UsePartialClass setting was located/stored.

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)?)

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 }

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.

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!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 17-Mar-2006 20:40:13   

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 simple_smile .

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 simple_smile 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);

Frans Bouma | Lead developer LLBLGen Pro