开发者

Tool to assess volatile dependencies in codebase for IoC refactoring

开发者 https://www.devze.com 2023-02-04 18:43 出处:网络
I\'m attempting to refactor a large codebase to use StructureMap. Does anyone know if there\'s a tool to quickly scan a codebase and report the number of volatile dependencies within classes? Sure, I

I'm attempting to refactor a large codebase to use StructureMap. Does anyone know if there's a tool to quickly scan a codebase and report the number of volatile dependencies within classes? Sure, I could always search all files for the word "new", but this would also find non-volatile dependencies such as tho开发者_开发知识库se used from BCL which are not material. I suppose that NDepend could, indirectly, provide some report on the degree of coupling which, is, indirectly, what I'm looking to eliminate. I'm just wondering if there was some tool that was specifically designed for the purpose of assisting with the migration towards the use of an IoC container.


I am not aware of anything like that. I think it would be quite hard to write a tool to identify volatile dependencies since they could be as diverse as file IO calls to database calls. Also, many developers draw the line between volatile and not in different places. Some would say System.Configuration is volatile, others would argue it is not...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号