Red Gate forums :: View topic - Microsoft.Practices.Prism question
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

Microsoft.Practices.Prism question

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
eric-914



Joined: 30 Nov 2012
Posts: 28

PostPosted: Tue Dec 04, 2012 6:12 pm    Post subject: Microsoft.Practices.Prism question Reply with quote

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:
    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...
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1115
Location: My desk.

PostPosted: Tue Dec 04, 2012 8:22 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group