public static glsl.ObjectCreationExpressionSyntax Translate(this cs.ObjectCreationExpressionSyntax node) { return(new glsl.ObjectCreationExpressionSyntax().Update( node.Type.Translate(), node.ArgumentList.Translate() )); }
public override VisualBasicSyntaxNode VisitObjectCreationExpression(CSS.ObjectCreationExpressionSyntax node) { return(SyntaxFactory.ObjectCreationExpression( SyntaxFactory.List <AttributeListSyntax>(), (TypeSyntax)node.Type.Accept(this), (ArgumentListSyntax)node.ArgumentList.Accept(this), (ObjectCreationInitializerSyntax)node.Initializer?.Accept(this) )); }
/// <summary> /// Searches for inner SyntaxNode of the ArgumentSyntax at given position. /// </summary> /// <param name="node"></param> /// <param name="position"></param> /// <returns></returns> public static SyntaxNode GetContentArgumentAtPosition(this ObjectCreationExpressionSyntax node, int position) { if (node.ArgumentList.Arguments.Count < position) { return(null); } return(node.ArgumentList.Arguments[position].DescendantNodes().FirstOrDefault()); }