2017-10-10 21 views
0

我在我的代碼中使用了ApplyToStateMachine,並且在我的類的構造函數中將其設置爲false。 現在使用最新版本的PostSharp,我看到這已經過時,我需要使用SemanticallyAdvisedMethodKinds。 如何將ApplyToStateMachine中的SemanticallyAdvisedMethodKinds替換爲與之前ApplyToStateMachine設置爲false時具有相同行爲?如何使用SemanticallyAdvisedMethodKinds而不是ApplyToStateMachine?

回答

0

要達到與設置爲falseApplyToStateMachine屬性相同的行爲,請將SemanticallyAdvisedMethodKinds屬性設置爲SemanticallyAdvisedMethodKinds.None

有關此主題的更多信息,請參閱http://doc.postsharp.net/semantic-advising

+0

謝謝Antonin! – Jaydeep