从 Windsor Castle 目录中检索 DLL
我目前有一个“PlugInFolder”文件夹,我想将自定义插件复制为 DLL 库。 每个插件都实现了我的“IPlugIn”接口。
我想在运行时使用温莎城堡检索它们。
我尝试过类似的操作但没有结果:
CastleContainer.Instance
.Install(
FromAssembly.InDirectory(new AssemblyFilter("PlugInFolder"))
);
CastleContainer.Instance.Register(Component.For<IPlugIn>());
IPlugIn[] plugIn= CastleContainer.Instance.ResolveAll<IPlugIn>();
我收到此错误:
Type ImageEditorInterfaces.IPlugIn is abstract.
As such, it is not possible to instansiate it as implementation of service ImageEditorInterfaces.IPlugIn.
I currently have a "PlugInFolder" folder where I want to copy my custom plug-in as DLL Library.
Every plug-in implements my "IPlugIn" interface.
I want to retrieve them at runtime with Windsor Castle.
I've tried something like this without results:
CastleContainer.Instance
.Install(
FromAssembly.InDirectory(new AssemblyFilter("PlugInFolder"))
);
CastleContainer.Instance.Register(Component.For<IPlugIn>());
IPlugIn[] plugIn= CastleContainer.Instance.ResolveAll<IPlugIn>();
I receive this error:
Type ImageEditorInterfaces.IPlugIn is abstract.
As such, it is not possible to instansiate it as implementation of service ImageEditorInterfaces.IPlugIn.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这样的事情:
Try something like this: