/// <summary>
        ///
        /// </summary>
        /// <param name="expression"></param>
        /// <returns></returns>
        public static ITranslationUnit BuildExpressionTranslationUnit(ITranslationUnit invokeeName, ITranslationUnit[] arguments)
        {
            InvokationExpressionTranslationUnit translationUnit = InvokationExpressionTranslationUnit.Create(invokeeName);

            if (arguments != null)
            {
                foreach (ITranslationUnit argument in arguments)
                {
                    translationUnit.AddArgument(argument);
                }
            }

            return(translationUnit);
        }
Пример #2
0
        private static ITranslationUnit BuildInvokationExpressionTranslationUnit(InvocationExpressionSyntax expression, SemanticModel semanticModel)
        {
            var helper = new InvokationExpression(expression, semanticModel);

            var translationUnit = InvokationExpressionTranslationUnit.Create(
                new ExpressionTranslationUnitBuilder(helper.Expression, semanticModel).Build());

            foreach (var argument in helper.Arguments)
            {
                var argumentTranslationUnit = new ExpressionTranslationUnitBuilder(argument.Expression, semanticModel).Build();

                translationUnit.AddArgument(argumentTranslationUnit);
            }

            return(translationUnit);
        }