Показать сообщение отдельно
Старый 21.08.2013, 09:48   #5  
Alex_KD is offline
Alex_KD
Участник
AxAssist
MCBMSS
Соотечественники
 
522 / 362 (14) ++++++
Регистрация: 06.07.2006
Адрес: Melbourne, Down Under
Метод из темы:

Код:
Method method = multipassAdmin.CompileSingleMethod(sourceCode) as Method;
Вернет чтото типа такого:

Код:
public abstract class MethodOrDelegate : CompilationUnit
{
    // Methods
    protected MethodOrDelegate();

    // Properties
    public AttributeList Attributes { get; internal set; }
    public IList<LocalDeclaration> Locals { get; internal set; }
    public string Name { get; internal set; }
    public IList<ParameterDeclaration> Parameters { get; internal set; }
    public IList<Statement> Statements { get; internal set; }
    public XppType Type { get; internal set; }
}
Где:

IList<LocalDeclaration> Locals - локальные переменные в твоем кода.
IList<ParameterDeclaration> Parameters - параметры.
IList<Statement> Statements - структура кода в методе.

Например один из Statements может быть IF -

Код:
public class IfStmt : Statement
{
    // Methods
    public IfStmt();
    public override string ToString(int indent);

    // Properties
    public Expression Condition { get; internal set; }
    public Statement Consequent { get; internal set; }
}
__________________
AxAssist 2012 - Productivity Tool for Dynamics AX 2012/2009/4.0/3.0
За это сообщение автора поблагодарили: mazzy (5).