Comments (6)
currently undocumented, but u can call VerifierSettings.InitializePlugins();
which will do a dll scan and call initialize on all verify plugins
from verify.icsharpcode.decompiler.
this is problematic for a couple of reasons
- it is desirable to be able to Verify ICSharpCode directly. ie i would prefer to have to remember to call
VerifyICSharpCodeDecompiler.Enable
once ather than remember that i always need to pass in a custom type that exists in Verify.ICSharpCode.Decompiler just to get the side effect of a hiddenVerifyICSharpCodeDecompiler.Enable
. - there is an ecosystem of extensions that all use the "enable in module init" pattern
from verify.icsharpcode.decompiler.
Actually I don't see why this is a problem.
- When you pass in a custom type to
Verify
(e.g.await Verify(new TypeToDisassemble(file, type))
), it requires that this custom type is registered. - If the type is not registered, there is no warning or error, it's just not working at all, which is very annoying.
So why not ensure that if you use such a custom type, it simply ensures that it's registered with Verify.
It does not break any other use case, just makes it more seamless to use. You can still can call Enable
by your own, if you like, and everything else will work the same, no matter if the types are registered or not.
Since this pattern is used in other extensions, too, maybe there should be a more global solution, like e.g. in Serilog where they look for such registration methods via reflection in all loaded assemblies?
from verify.icsharpcode.decompiler.
but await Verify(new AssemblyToDisassemble(file))
requires people to always remember to use AssemblyToDisassemble
every single time they verify an assembly. ie this wont work
using var file = new PEFile(assembly2Path);
await Verify(file);
from verify.icsharpcode.decompiler.
So we make every days life harder, just to optimize one very rare edge case?
from verify.icsharpcode.decompiler.
"passing the actual type from the underlying library" is not a rare edge case. it is how the majority of verification happens
from verify.icsharpcode.decompiler.
Related Issues (9)
- Simply referencing Verify.ICSharpCode.Decompiler crashes all verify tests
- update refs
- Normalize IL to ensure consistent outcome. HOT 2
- Genneric types or methods are not found
- Type lookup does not find nested types
- MethodToDisassemble fails when overloaded methods exist HOT 1
- RVA scrubber fails for large assemblies where RVA is longer than 4 digits
- PropertyToDisassemble does not work as expeced-
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verify.icsharpcode.decompiler.