I would like to get the AppData path of my current application. I used to do this with Application.UserAppDataPath but it's in the System.Windows.Forms namespace and I want to get rid of that. I need it in the repository layer and its a wpf application anyway.
No more reason than to reduce the smell.
Thy and BR, Matthias
I just had a look into the source coude of System.Windows.Forms.dll. There you can find this:
When starting to clone this code in a class on my own I failed after having several properties, other assemblies, reflection, helper aso. So I wrote a VERY SIMPLIFIED class on my own.
I know that there are some hardcoded strings. But right now, refering to your given limitations, I would give this code a try.