Microsoft.Practices.Prism question

.NET obfuscator and automated error reporting

Microsoft.Practices.Prism question

Postby eric-914 » Tue Dec 04, 2012 6:12 pm

Hello, I've had trouble obfuscating a few ViewModel classes. Ultimately, I discovered that since I serialize a few of said classes I had to exclude them from obfuscation because of the Obfuscation/Reflection issue.

This isn't a big deal. But I noticed I couldn't simply obfuscate Microsoft.Practices.Prism. I thought since my VM classes derive from NotificationObject, that it's probably that this class needed to be excluded. But turns out there are no public methods. So NotificationObject could be obfuscated.

Ok then, who's the culprit? I tracked it down to this class/method/code:

Code: Select all
    public class UriQuery : IEnumerable<KeyValuePair<string, string>>
        private readonly List<KeyValuePair<string, string>> entries
           = new List<KeyValuePair<string, string>>();

        public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
            return this.entries.GetEnumerator();

Can someone explain to me why the above code can't be obfuscated? Just curious...
Posts: 30
Joined: Fri Nov 30, 2012 5:51 pm

Postby james.billings » Tue Dec 04, 2012 8:22 pm

Hi - some reasons for exclusion are detailed in this article although a quick scan doesn't immediately point to anything obvious as far as I can see.

One option would also be to turn on logging as this will normally have some clues in it as to why something was skipped from obfuscation.
Posts: 1120
Joined: Wed Jun 16, 2010 11:10 am
Location: Red Gate

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests