Показать сообщение отдельно
Старый 20.12.2015, 09:16   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
mfp: X++ in AX7: Forms implementing interface
Источник: http://blogs.msdn.com/b/mfp/archive/...interface.aspx
==============


Forms can now implement interfaces.

public class MyForm extends FormRun implements SysPackable
{
}



This is pretty cool, because:
  1. The compiler will validate that the interface is correctly implemented.
  2. No longer a need to use reflection, like hasFormMethod(), to determine if it is safe to call the method.
  3. No longer a need to downcast to object to invoke the methods. Now cast to the interface:

    var sysPackable = myFormRun as SysPackable;

    if (sysPackable)
    {
    sysPackable.pack();
    }

THIS POST APPLIES TO MICROSOFT DYNAMICS AX7 TECHNICAL PREVIEW; IS PROVIDED AS-IS AND CONFERS NO RIGHTS.




==============
Источник: http://blogs.msdn.com/b/mfp/archive/...interface.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.