Preserve method, implementing an interface

Posts   
 
    
Gabor
User
Posts: 97
Joined: 29-Jan-2005
# Posted on: 20-Feb-2006 10:55:19   

Hi,

I created an Interface, and want some of the generated entity classes to implement them.

The class preserves the interface declaration between user code region "additionalInterfaces", but wich user code region to choose, to preserve the method signature implementing this interface's method/property?

I tried:

__LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty Public Overridable Property Inact As System.Boolean Implements IInact.Inact ' __LLBLGENPRO_USER_CODE_REGION_END

but this, and any other unfortunately doesn't work for me.

Thanks in advance

Gabor

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Feb-2006 14:54:42   

Please use the CustomEntityCode code region.

Gabor
User
Posts: 97
Joined: 29-Jan-2005
# Posted on: 20-Feb-2006 15:02:21   

Thanks,

I tried it, but doesn't work:

' __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode Public Overridable Property Inact As System.Boolean Implements IInact.Inact ' __LLBLGENPRO_USER_CODE_REGION_END

After regenerating the code, I get the original version.

Maybe, I have to put the whole property between user code region?

Thanks

Gabor

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Feb-2006 15:20:44   

All your manually added code should be added within code regions

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 20-Feb-2006 15:25:07   

And teh region to use is the pre-generated region, don't add one yourself, but use the region created for you at the bottom of an entity class.

Frans Bouma | Lead developer LLBLGen Pro
Gabor
User
Posts: 97
Joined: 29-Jan-2005
# Posted on: 20-Feb-2006 15:37:33   

Yes thank You,

The problem is, when I add the whole property code inside the Custom Entityty Code region, on preserves the property now, but the generator generates a new one also, inside the "Class Property Declarations" region, that doesn't implement the interface.

So I have two properties with same signature, in two regions confused

Thanks

Gabor

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Feb-2006 07:23:26   

You should use a different Name for the property, if it's already there.