This project is read-only.

Extending BlogEngine.Net

Topics: Controls
Jul 5, 2008 at 8:25 PM
I have some familiarity with Extensions and Controls, but I'm  not sure how to approach this next issue I am faced with.

I would like to add a variable to the Post class.  But I realized the hard way through this and several other projects, that when you modify the core components, all your code will be wiped out when an Upgrade is released.  So I'm not quite sure what the best way would be to add a variable to the Post class. 

Should I inherit from the Post class? and change all the BlogEngine.Core.Post references to MyPostClass?

Maybe I'm headed in the wrong direction, but I know modifying the Post class directly is just going to cause headaches in the future.

Jul 5, 2008 at 8:46 PM
In case that wasn't clear:

I am trying to add a couple of Strings and an Integer to individual posts that will be stored and persisted on disk in the XML or SQL databases.
Ideally, doing a minimal amount of work.   I *could* write some extension to keep track of these variables on my own, but it would break the coupling and design if I stored the data in a separate file, for example.

Any thoughts?