Как узнать, когда содержимое модуля изменяется в Sitefinity

Разница между каждой аннотацией:

+-------------------------------------------------------------------------------------------------------+
¦                                       Feature                            ¦   Junit 4    ¦   Junit 5   ¦
¦--------------------------------------------------------------------------+--------------+-------------¦
¦ Execute before all test methods of the class are executed.               ¦ @BeforeClass ¦ @BeforeAll  ¦
¦ Used with static method.                                                 ¦              ¦             ¦
¦ For example, This method could contain some initialization code          ¦              ¦             ¦
¦-------------------------------------------------------------------------------------------------------¦
¦ Execute after all test methods in the current class.                     ¦ @AfterClass  ¦ @AfterAll   ¦
¦ Used with static method.                                                 ¦              ¦             ¦
¦ For example, This method could contain some cleanup code.                ¦              ¦             ¦
¦-------------------------------------------------------------------------------------------------------¦
¦ Execute before each test method.                                         ¦ @Before      ¦ @BeforeEach ¦
¦ Used with non-static method.                                             ¦              ¦             ¦
¦ For example, to reinitialize some class attributes used by the methods.  ¦              ¦             ¦
¦-------------------------------------------------------------------------------------------------------¦
¦ Execute after each test method.                                          ¦ @After       ¦ @AfterEach  ¦
¦ Used with non-static method.                                             ¦              ¦             ¦
¦ For example, to roll back database modifications.                        ¦              ¦             ¦
+-------------------------------------------------------------------------------------------------------+

Большая часть аннотаций в обеих версиях одинакова, но мало чем отличается.

Ссылка

Порядок выполнения.

Пунктирная рамка -> необязательная аннотация.

0
задан Aiswarya R 27 March 2019 в 08:29
поделиться

1 ответ

Вы можете подключиться к любому из этих событий: https://www.progress.com/documentation/sitefinity-cms/for-developers-dynamic-modules-events

, например. IDynamicContentUpdatingEvent или IDynamicContentUpdatedEvent и выполнить свою логику.

Будьте внимательны, поскольку эти события могут срабатывать несколько раз, один раз для предмета Temp и снова для предмета Master, так что вы можете проверить это.

0
ответ дан Veselin Vasilev 27 March 2019 в 08:29
поделиться
Другие вопросы по тегам:

Похожие вопросы: