灵感菇

AI 技能的自然生态,你的一句话,蔓延出无限连接。

返回搜索

通用助手 / 编排推荐

migrate-static-to-wrapper

migrate-static-to-wrapper

安装量 140GitHub Stars 1,709更新时间 2026年5月16日

描述

Mechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope (file, project, or namespace). Performs codemod-style bulk replacement of DateTime.UtcNow to TimeProvider.GetUtcNow(), File.ReadAllText to IFileSystem, and similar transformations. Adds constructor injection parameters and updates DI registration. USE FOR: replace DateTime.UtcNow with TimeProvider, replace DateTime.Now with TimeProvider, migrate static calls to wrapper, bulk replace File.* with IFileSystem, codemod static to injectable, add constructor injection for time provider, mechanical migration of statics, refactor DateTime to TimeProvider, swap static for injected dependency, convert static calls to use abstraction, replace statics in a class, migrate one file to TimeProvider, scoped migration, update call sites. DO NOT USE FOR: detecting statics (use detect-static-dependencies), generating wrappers (use generate-testability-wrappers), migrating between test frameworks.

安全审计

使用前的风险提示

未审计

规则审计

未审计
更新 1年1月1日

智能审计

未审计
更新 1年1月1日
uimigratestaticwrappermechanicallyreplacedependencycallsitesbuiltabstractioncalls