Dismiss Notice

Register now to be one of the first members of this SharePoint Community! Click here it just takes seconds!

Dismiss Notice
Welcome Guest from Country Flag

Extending WHS – Adding a new location directive strategy

Discussion in 'Official Microsoft News' started by Michael Fruergaard, Apr 12, 2017.

Thread Status:
Not open for further replies.
  1. Michael Fruergaard

    Michael Fruergaard Guest

    Blog Posts:
    0
    [​IMG]

    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:

    [​IMG]

    Here is an example:

    [​IMG]

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

    Continue reading...
     
Thread Status:
Not open for further replies.

Share This Page

LiveZilla Live Chat Software