Exemplo n.º 1
0
        public static ITranslationUnit BuildCastExpressionTranslationUnit(CastExpressionSyntax castExpression, SemanticModel semanticModel)
        {
            var helper = new CastExpression(castExpression, semanticModel);

            return(CastExpressionTranslationUnit.Create(
                       TypeIdentifierTranslationUnit.Create(helper.Type.MapType()),
                       new ExpressionTranslationUnitBuilder(helper.Expression, semanticModel).Build()));
        }
 /// <summary>
 /// /
 /// </summary>
 /// <param name="type"></param>
 /// <param name="variableName"></param>
 /// <returns></returns>
 public static ITranslationUnit BuildExpressionTranslationUnit(string type, string variableName)
 {
     return(CastExpressionTranslationUnit.Create(
                TypeIdentifierTranslationUnit.Create(type),
                IdentifierTranslationUnit.Create(variableName)));
 }