MediateV.S EventHandler

最近看了一些wiz框架的例子,发现Mediate这个标签用的比较多,只知道它的做用跟EventHandler是同样的,可是二者有什么区别,实在是没搞明白。原觉得这个标签功能更强悍,上网google了一把,才知道在SWIZ1.0以后更偏向用EventHandler,由于Mediate会让人感到有些疑惑,并且不能很好的描述这个标签的意图,用EventHandler就明朗多了.如下是原话:框架

Mediate will continue to work since it has been around for so long, but it
is being deprecated in favor of the [EventHandler] metadata tag. We decided
that Mediate was just confusing and didn't describe the intent of the tag
very well. EventHandler makes it more obvious what the tag is doing.

ide

相关文章
相关标签/搜索