如何加载DLL并将路由URL分配给方法以将其用作WebAPI调用?
我正在用ASP.NET核心编写一个应用程序,其中包含一组WebAPI定义的USIG MVC和路由属性。 现在,我想管理添加功能,但是作为一个插件,我将在外部DLL中定义它们,然后加载它
Assembly assemblyPlugin = Assembly.LoadFrom(DLL2load);
是可以的,但是我如何能够从Anotther应用程序中将其方法称为WebAPI? 我是否可以在加载的DLL内定义其路由属性,或在将其加载到主应用程序中后分配?我该怎么做?
i'm writing an application in asp.net core with a set of webAPI defined usig MVC and routing attributes.
Now i'd like to manage additionals functions but, as a plugin, i'm going to define them in a external DLL and then load it with
Assembly assemblyPlugin = Assembly.LoadFrom(DLL2load);
This is ok but how can i be able to call its methods as webAPI from anotther application ?
May i have to define their routing attributes inside the loaded DLL or to assign them after loading it in the main application? How can i do it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以做以下操作,
you can do following,