Pruning and public interfaces

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Pruning and public interfaces

Postby eric-914 » Wed Dec 05, 2012 4:53 pm

Just wondering if someone can explain S/A's pruning behavior in regards to public interfaces? Does it prune these?
eric-914
 
Posts: 28
Joined: Fri Nov 30, 2012 5:51 pm

Postby Simon C » Wed Dec 05, 2012 6:07 pm

If the assembly is a dll, no public members are pruned at all. If the assembly is an exe, all public members are pruned if they are not used elsewhere. This includes public interfaces.

May I ask what prompted this question?
Simon C
 
Posts: 140
Joined: Tue Feb 26, 2008 4:56 pm
Location: Red Gate Software

Pruning and public interfaces

Postby eric-914 » Wed Dec 05, 2012 11:01 pm

I've been painfully determining what can and what cannot be pruned in our WPF type application. I had narrowed down a set of problems to a namespace full of interfaces, but that namespace also included the equivalent of implementation classes.

In the end, it turns out a few implementation classes had some methods that weren't part of their parent interfaces that were being cut out.

Anyway, got me wondering if I ever have to worry about [DoNotPruneType] on an interface.

So far, anything remotely behaving like a View Model in the MVVM pattern cannot be pruned. S/A doesn't check for property usage w/in XAML. And since WPF binds everything as "object", I doubt it could anyway.
eric-914
 
Posts: 28
Joined: Fri Nov 30, 2012 5:51 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests