protected NewingTranslationBase(NewExpression newing, ITranslationContext context) { Parameters = ParameterSetTranslation.For( new CtorInfoWrapper(newing.Constructor), newing.Arguments, context); }
public static ITranslation ForDynamicMethodCall( ITranslation subjectTranslation, IMethod method, ICollection <Expression> arguments, ITranslationContext context) { return(new StandardMethodCallTranslation( Dynamic, subjectTranslation, method, ParameterSetTranslation.For(arguments, context).WithParentheses(), context)); }
public LambdaTranslation(LambdaExpression lambda, ITranslationContext context) { Type = lambda.Type; _parameters = ParameterSetTranslation.For(lambda.Parameters, context); _bodyTranslation = context.GetCodeBlockTranslationFor(lambda.Body); TranslationSize = _parameters.TranslationSize + _fatArrow.Length + _bodyTranslation.TranslationSize; FormattingSize = _parameters.FormattingSize + _bodyTranslation.FormattingSize; if (_bodyTranslation.IsMultiStatement == false) { _bodyTranslation.WithoutTermination(); } }
public static ITranslation For(RuntimeVariablesExpression runtimeVariables, ITranslationContext context) { return(ParameterSetTranslation .For(runtimeVariables.Variables, context) .WithTypes(ExpressionType.RuntimeVariables, runtimeVariables.Type)); }