Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试了两天的示例,说明如何使用 Ninject 将值传递给类板的构造函数。我看过很多例子,但我不太了解。特别是我想看到,以及记录建筑物的配置(绑定)以及在运行时传递一个值:
_Kernel.Get(of MyRoot)(Pass. "TheValue". At.param. "Param1". For(of INdependency))
您可以尝试使用 .WithConstructorArgument。