I have a WPF user control which displays a piece of data on the screen.
I would like to use the same WPF front end but have the data come from two possible alternate sources:
- A linked class library or
- A WCF service
The rationale is that I want to create two versions of my software one for sale and the other for trial. Rather than run the risk of creating a fully-contained application which is protected by some time-limit and have someone hack it, I'd prefer to give a client-server version of the software where I can limit the availability from the back-end.
For example, say the user control displays the day of the week and I get the day of the week from a method GetDayOfWeek(DateTime dateTime). I want to be able to either call that method from a linked class library or from a WCF service. (The decision can be based on a configuration parameter or even by automatically detecting the presence of the linked library).
Any ideas?