Typed List Row Code: Constructor Accessibility

Posts   
 
    
everettm
User
Posts: 39
Joined: 17-Apr-2006
# Posted on: 22-Nov-2006 17:50:45   

LLBL Version: 2.0 Pattern: Adpater Language: C# Fx Version: 1.1

Where possible I prefer to customize the generated code via inheritance. I've had a couple of occasions where I've wanted to customize a typed list class and its associated row class. The difficulty I've had to work around is the fact that the accessibility on the constructor for the Typed List Row is 'internal' rather than 'internal protected'. This prevents me from inheriting from the generated row class and then overriding the NewRowFromBuilder method in the list and substituting my custom row. Could you explain your thinking behind choosing the 'internal' accessibility rather than 'internal protected'. I'm pretty sure I understand the implications of each accessibility level I just want to be sure I'm not overlooking a more subtle implication before I decide on whether to change the template.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 23-Nov-2006 12:04:42   

That's an oversight. I never thought of the possibility of having a protected internal ctor instead of an internal ctor. I'll make it protected internal in the next build so you can override the ctor in a derived class.

Frans Bouma | Lead developer LLBLGen Pro
everettm
User
Posts: 39
Joined: 17-Apr-2006
# Posted on: 30-Nov-2006 14:37:48   

Thanks!