using Hastypedview condition for including Namespace

Posts   
 
    
KS
User
Posts: 55
Joined: 08-Aug-2006
# Posted on: 27-Oct-2006 17:58:22   

<Environment Info> Adpater pattern LLBL Designer version 2.0.0.0 LLBLGen Pro .NET 2.0 ORM Support Classes 2.0.0.60904 .Net 2.0 VS.NET 2005 </Environment Info>

Can we do this at top of any cs file . Coditionally including Namespace for TypedView classes.

<[If HasTypedView]> using <[RootNamespace]>.TypedViewClasses;<[EndIf]>

Generated code for this is ::

if

using ADC.SEM.DAL.TypedViewClasses;

Extra "#if" is there in it

Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 27-Oct-2006 18:47:16   

Yes that should work.

Frans Bouma | Lead developer LLBLGen Pro
KS
User
Posts: 55
Joined: 08-Aug-2006
# Posted on: 27-Oct-2006 19:06:33   

Hey Frans,

Yeah it worked after taking out space between <If TypedView> and using.

<Not Working> <[If HasTypedView]> using <[RootNamespace]>.TypedViewClasses;<[EndIf]> </Not Working>

<Working> <[If HasTypedView]>using <[RootNamespace]>.TypedViewClasses;<[EndIf]> </Working>

However I couldn't make below thing work :: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7981

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 27-Oct-2006 20:20:17   

Hmm I don't see why that space is relevant... flushed . The check doesn't know what's inside the if statement.

Btw, what does 'not working' mean exactly?

Frans Bouma | Lead developer LLBLGen Pro
KS
User
Posts: 55
Joined: 08-Aug-2006
# Posted on: 31-Oct-2006 15:09:41   

By not working I meant it added "#if" for a space before using.

<[If HasTypedView]> using <[RootNamespace]>.TypedViewClasses;<[EndIf]>

Generated code for this is ::

if

using ADC.SEM.DAL.TypedViewClasses;.

Anyways after taking out space it worked for me, so no issues.