我遇到了一个面试问题,我从 friend 和同行那里得到了不同的答案,所以我想我会在这里问。
我们通常使用插件排名来定义不同插件的执行顺序,以克服依赖性问题。
问题
如果一个实体在同一事件和同一阶段注册了多个插件(来自不同的 dll 或相同的 dll),并且所有插件的排名/顺序为 1 - 它们被触发的顺序是什么?
它们都是并行执行的吗?这是否取决于哪个插件首先注册等?
如果可以,请给我指点任何 MSDN 引用资料。
提前致谢。
最佳答案
嗨,请找到以下复制自 MSDN
,
执行顺序:
Specifies the order, also known as rank, that plug-ins are executed within a
pipeline stage. Plug-ins registered with an order value of 1 are executed
first, followed by plug-ins registered with an order of 2, and so on. However,
if there is more than one plug-in in a stage with the same order value, then
the plug-in with the earliest compilation date is called first.
Using the Plug-in Registration Tool for Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
关于dynamics-crm - Dynamics CRM - 同一事件的多个插件,具有相同等级的舞台 - 执行顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47448110/