WTM icon indicating copy to clipboard operation
WTM copied to clipboard

关于ConfigInfo的应用

Open hanshuhe opened this issue 5 years ago • 1 comments

亮总好,我自己建了一个XXHelper的类,里边想使用ConfigInfo读取配置文件中的东西,怎么使用呢?看文档,说ConfigInfo在Controller里或者VM里可以用。但我想在XXHelper里用,怎么用呢?

hanshuhe avatar Feb 06 '20 05:02 hanshuhe

可以使用框架提供的全局方法 GlobalServices.GetRequiredService<Configs>()

liuliang-wt avatar Feb 06 '20 07:02 liuliang-wt