I have a WF4 custom activity with a custom designer (WPF). I would like to have slightly different behaviour in the CacheMetaData override depending on if the Activity is in Design or Execution mode.
Edit: Reasons for requirement. We have validation that needs to look up the data from the web.config file (or one of its includes). At run time we can use System.Configuration.ConfigurationManager, and at design time I need to use EnvDte to interrogate the project structure.
Since the Activity can be debugged, it could in be VS in either case so I cannot check for that.
Is there a service within WF4 I can call to tell what mode I'm in please?