|
19.12.2015, 16:12 | #1 |
Участник
|
mfp: X++ in AX7: Method signatures
Источник: http://blogs.msdn.com/b/mfp/archive/...ignatures.aspx
============== This post is about one of the more subtle changes in AX7. AX7 uses the .NET runtime, aka CLR. This has some implications for method signatures. In the CLR a method's signature includes casing, parameters and return type. In AX2012 a method's signature was simply the method's name – case insensitive. Why is this important? If you change a method's signature, then all references to the method needs to be recompiled. Including those changes that appear harmless, like:
Notice the System.MissingMethodException: Method not found: 'Void Dynamics.AX.Application.MyClass.myMethod()'. The CLR only knows of a method with all lower case. Optional parameters It is still safe to add and remove (unused) optional parameters. The X++ compiler uses CLR's method overloading, i.e. several methods with the same name and the variations of supported parameters are produced by the compiler. Lesson to learn Do not change a method's signature, unless you are willing (and able) to recompile all consumers. THIS POST APPLIES TO MICROSOFT DYNAMICS AX7 TECHNICAL PREVIEW; IS PROVIDED AS-IS AND CONFERS NO RIGHTS. ============== Источник: http://blogs.msdn.com/b/mfp/archive/...ignatures.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Похожие темы | ||||
Тема | Ответов | |||
mfp: X++ in AX7: Extension methods | 10 | |||
mfp: X++ in AX7: Const keyword | 0 | |||
mfp: X++ in AX7: Readonly keyword | 3 | |||
mfp: X++ in AX7: Static event subscription | 0 | |||
mfp: X++ in AX7 | 0 |
|