Click here to Skip to main content
15,178,967 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Will technology ever progress again? Pin
Super Lloyd9-Apr-12 19:14
MemberSuper Lloyd9-Apr-12 19:14 
GeneralRe: Will technology ever progress again? Pin
Alberto Bar-Noy9-Apr-12 21:55
MemberAlberto Bar-Noy9-Apr-12 21:55 
GeneralRe: Will technology ever progress again? Pin
GuyThiebaut9-Apr-12 23:16
professionalGuyThiebaut9-Apr-12 23:16 
GeneralRe: Will technology ever progress again? Pin
killabyte9-Apr-12 23:44
Memberkillabyte9-Apr-12 23:44 
GeneralGnarly Declaration of the Week Pin
Chris Maunder9-Apr-12 16:45
cofounderChris Maunder9-Apr-12 16:45 
GeneralRe: Gnarly Declaration of the Week Pin
Brisingr Aerowing9-Apr-12 17:18
professionalBrisingr Aerowing9-Apr-12 17:18 
GeneralRe: Gnarly Declaration of the Week Pin
killabyte9-Apr-12 17:35
Memberkillabyte9-Apr-12 17:35 
GeneralRe: Gnarly Declaration of the Week Pin
Chris Maunder9-Apr-12 17:47
cofounderChris Maunder9-Apr-12 17:47 
Not sure what you're thinking here. In our instance we needed a generic baseclass to provide a typesafe implementation of common static methods.

So we have

C#
public class MyType : BaseTypeController<MyType>
{
   ...
}


and then we do
C#
MyType result MyType.GetType()


(I know all the purists have just thrown up at the thought of using a static method to return an object, but these are core "type" entities that specifically aren't being given the opportunity to have their implementations replaced via IoC or whatever. They are essentially type-safe rich enums (sorta) that get the collection of values they can take from the database. eg PublishingStatus is of type BaseTypeController so we can do things like PublishingStatus.FromName("Available"), or we can define some "must-have" values and then do PublishingStatus.Available, and then when we need a new publishing status value in the DB, we just add the row and the code all continues happily with no recompilation needed.

I'm running on too little sleep so I'm drawing a blank as to how you'd do that with extensions.
cheers,
Chris Maunder

The Code Project | Co-founder
Microsoft C++ MVP

GeneralRe: Gnarly Declaration of the Week Pin
PIEBALDconsult9-Apr-12 19:29
professionalPIEBALDconsult9-Apr-12 19:29 
GeneralRe: Gnarly Declaration of the Week Pin
AspDotNetDev9-Apr-12 19:34
protectorAspDotNetDev9-Apr-12 19:34 
GeneralRe: Gnarly Declaration of the Week Pin
PIEBALDconsult9-Apr-12 19:53
professionalPIEBALDconsult9-Apr-12 19:53 
GeneralRe: Gnarly Declaration of the Week Pin
Brisingr Aerowing9-Apr-12 20:08
professionalBrisingr Aerowing9-Apr-12 20:08 
GeneralRe: Gnarly Declaration of the Week Pin
Mel Padden10-Apr-12 0:29
MemberMel Padden10-Apr-12 0:29 
GeneralRIP Jack Tramiel Pin
Dalek Dave9-Apr-12 13:08
professionalDalek Dave9-Apr-12 13:08 
GeneralRe: RIP Jack Tramiel Pin
Paul Conrad9-Apr-12 14:11
professionalPaul Conrad9-Apr-12 14:11 
GeneralRe: RIP Jack Tramiel Pin
Michael Bergman9-Apr-12 16:52
MemberMichael Bergman9-Apr-12 16:52 
GeneralRe: RIP Jack Tramiel Pin
Steve Mayfield9-Apr-12 19:06
MemberSteve Mayfield9-Apr-12 19:06 
GeneralIsn't she a little ........................................... Pin
Henry Minute9-Apr-12 11:32
MemberHenry Minute9-Apr-12 11:32 
GeneralRe: Isn't she a little ........................................... Pin
wizardzz9-Apr-12 11:47
Memberwizardzz9-Apr-12 11:47 
GeneralRe: Isn't she a little ........................................... Pin
PJ Arends9-Apr-12 17:29
professionalPJ Arends9-Apr-12 17:29 
GeneralRe: Isn't she a little ........................................... Pin
Septimus Hedgehog10-Apr-12 4:51
MemberSeptimus Hedgehog10-Apr-12 4:51 
GeneralCode Magazines Pin
bhogan9-Apr-12 10:43
Memberbhogan9-Apr-12 10:43 
GeneralRe: Code Magazines Pin
AspDotNetDev9-Apr-12 10:56
protectorAspDotNetDev9-Apr-12 10:56 
GeneralRe: Code Magazines Pin
Terrence Dorsey10-Apr-12 10:18
staffTerrence Dorsey10-Apr-12 10:18 
GeneralRe: Code Magazines Pin
Roger Wright9-Apr-12 10:57
professionalRoger Wright9-Apr-12 10:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.