How to specify AddIn process names?

蓝咒 提交于 2019-12-01 16:37:19

问题


I am using the Microsoft AddIn Framework to load AddIn assemblies. I am running them in their own process as to separate them from the service. The thing I don't like it that every AddIn process shows up as AddInProcess32.exe in the task manager. When using process isolation, how can we rename the name that shows in the taskmanager so that it's more descriptinve for users?


回答1:


Unfortunately you can not.

Filename for that process is hardcoded in private method GetProcessName(Platform platform) which is called in constructor of the System.AddIn.Hosting.AddInProcess class. And System.AddIn.Hosting.AddInProcess is a sealed class so it can't be inherited and that method can't be overriden.

The only way to customize process name for your add-in is to decline idea about using System.AddIn framework and create your own.

Here is a good list of articles about creating plugin architecture in c# with a lot of examples: Creating a plug-in framework in C#: Resources.



来源:https://stackoverflow.com/questions/8349155/how-to-specify-addin-process-names

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!