最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Extending WHS – Adding a new location directive strategy

网络文摘 William 2054浏览 0评论

To create a new location directive strategy, follow these steps:

  1. Create an enum extension of the WhsLocDirStrategy enum. Add an entry with name and label for your strategy.
  2. Create a class extending the WhsLocationDirectiveStrategy abstract class. Implement the performStrategy() method
  3. Decorate your new class with the WhsLocationDirectiveStrategyFactoryAttribute, linking your class and enum entry together.

Notice: The strategies are instantiated only once each – following the singleton pattern. This means your strategy class must not contain any state.

Here is a diagram showing the extension points:

Here is an example:

THIS POST APPLIES TO MICROSOFT DYNAMICS FOR OPERATIONS SPRING 2017 PREVIEW; IS PROVIDED AS-IS AND CONFERS NO RIGHTS.

转载请注明:ww12345678 的部落格 | AX Helper » Extending WHS – Adding a new location directive strategy

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址