File tree Expand file tree Collapse file tree
ICSharpCode.CodeConverter/VB Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -636,6 +636,26 @@ public override VisualBasicSyntaxNode VisitBracketedParameterList(CSS.BracketedP
636636 return SyntaxFactory . ParameterList ( SyntaxFactory . SeparatedList ( node . Parameters . Select ( p => ( ParameterSyntax ) p . Accept ( TriviaConvertingVisitor ) ) ) ) ;
637637 }
638638
639+ public override VisualBasicSyntaxNode VisitTupleType ( CSS . TupleTypeSyntax node )
640+ {
641+ var elements = node . Elements . Select ( e => ( TupleElementSyntax ) e . Accept ( TriviaConvertingVisitor ) ) ;
642+ return SyntaxFactory . TupleType ( SyntaxFactory . SeparatedList ( elements ) ) ;
643+ }
644+
645+ public override VisualBasicSyntaxNode VisitTupleElement ( CSS . TupleElementSyntax node )
646+ {
647+ return SyntaxFactory . TypedTupleElement ( ( TypeSyntax ) node . Type . Accept ( TriviaConvertingVisitor ) ) ;
648+ }
649+
650+ public override VisualBasicSyntaxNode VisitTupleExpression ( CSS . TupleExpressionSyntax node )
651+ {
652+ var args = node . Arguments . Select ( a => {
653+ var expr = ( ExpressionSyntax ) a . Expression . Accept ( TriviaConvertingVisitor ) ;
654+ return SyntaxFactory . SimpleArgument ( expr ) ;
655+ } ) ;
656+ return SyntaxFactory . TupleExpression ( SyntaxFactory . SeparatedList ( args ) ) ;
657+ }
658+
639659 public override VisualBasicSyntaxNode VisitParameter ( CSS . ParameterSyntax node )
640660 {
641661 var id = CommonConversions . ConvertIdentifier ( node . Identifier ) ;
Original file line number Diff line number Diff line change @@ -339,6 +339,19 @@ Return New Object() Is New Object()
339339End Function" ) ;
340340 }
341341
342+ [ Fact ]
343+ public void TupleType ( )
344+ {
345+ TestConversionCSharpToVisualBasic ( @"public interface ILanguageConversion
346+ {
347+ IReadOnlyCollection<(string, string)> GetProjectTypeGuidMappings();
348+ IEnumerable<(string, string)> GetProjectFileReplacementRegexes();
349+ }" , @"Public Interface ILanguageConversion
350+ Function GetProjectTypeGuidMappings() As IReadOnlyCollection(Of (String, String))
351+ Function GetProjectFileReplacementRegexes() As IEnumerable(Of (String, String))
352+ End Interface" ) ;
353+ }
354+
342355 [ Fact ]
343356 public void DelegateExpression ( )
344357 {
You can’t perform that action at this time.
0 commit comments