diff --git a/Tests/CSharp/MultiFileSolutionAndProjectTests.cs b/Tests/CSharp/MultiFileSolutionAndProjectTests.cs index 26a23d075..38fd61434 100644 --- a/Tests/CSharp/MultiFileSolutionAndProjectTests.cs +++ b/Tests/CSharp/MultiFileSolutionAndProjectTests.cs @@ -18,20 +18,20 @@ public MultiFileSolutionAndProjectTests(MultiFileTestFixture multiFileTestFixtur _multiFileTestFixture = multiFileTestFixture; } - [Fact] /* enable for executing locally */ + [Fact] public async Task ConvertWholeSolutionAsync() { await _multiFileTestFixture.ConvertProjectsWhereAsync(p => true, Language.CS); } - [Fact] /* enable for executing locally */ + [Fact] public async Task ConvertVbLibraryOnlyAsync() { await _multiFileTestFixture.ConvertProjectsWhereAsync(p => p.Name == "VbLibrary", Language.CS); } - [Fact] + [Fact(Skip= "Roslyn bugs mean we can't run this test: https://github.com/icsharpcode/CodeConverter/pull/1116#issuecomment-2242645546")] public async Task ConvertVbUsingCSharpRefReturnOnlyAsync() { await _multiFileTestFixture.ConvertProjectsWhereAsync(p => p.Name == "VisualBasicUsingCSharpRefReturn", Language.CS); diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln index 04b468a66..8ea27f224 100644 --- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln +++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertCSharpConsoleAppOnly/CharacterizationTestSolution.sln @@ -26,10 +26,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix. EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpRefReturn", "CSharpRefReturn\CSharpRefReturn.csproj", "{8B843547-F49D-40A2-8C4E-1B81D8C5D589}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicUsingCSharpRefReturn", "VisualBasicUsesCSharpRefReturn\VisualBasicUsingCSharpRefReturn.vbproj", "{6266982D-4807-4619-A71D-1440D0B6B6F4}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,14 +68,6 @@ Global {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.Build.0 = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/CSharpRefReturn.csproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/CSharpRefReturn.csproj deleted file mode 100644 index 71e958a13..000000000 --- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/CSharpRefReturn.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - - Debug - AnyCPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589} - Library - Properties - CSharpRefReturn - CSharpRefReturn - v4.8 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/Properties/AssemblyInfo.cs b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/Properties/AssemblyInfo.cs deleted file mode 100644 index c6a300242..000000000 --- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CSharpRefReturn")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CSharpRefReturn")] -[assembly: AssemblyCopyright("Copyright © 2024")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8b843547-f49d-40a2-8c4e-1b81d8c5d589")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/RefReturnList.cs b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/RefReturnList.cs deleted file mode 100644 index db4e66c00..000000000 --- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CSharpRefReturn/RefReturnList.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CSharpRefReturn -{ - public class RefReturnList - { - private T dummy; - public ref T this[int i] { - get { - return ref dummy; - } - } - - public ref T RefProperty - { - get - { - return ref dummy; - } - } - } -} diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln index 7df2f8d8e..d462a1431 100644 --- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln +++ b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/CharacterizationTestSolution.sln @@ -26,10 +26,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix. EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpRefReturn", "CSharpRefReturn\CSharpRefReturn.csproj", "{8B843547-F49D-40A2-8C4E-1B81D8C5D589}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicUsingCSharpRefReturn", "VisualBasicUsesCSharpRefReturn\VisualBasicUsingCSharpRefReturn.vbproj", "{6266982D-4807-4619-A71D-1440D0B6B6F4}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,14 +68,6 @@ Global {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.Build.0 = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/VisualBasicUsingCSharpRefReturn.vbproj b/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/VisualBasicUsingCSharpRefReturn.vbproj deleted file mode 100644 index 6a5b57263..000000000 --- a/Tests/TestData/MultiFileCharacterization/CSToVBResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/VisualBasicUsingCSharpRefReturn.vbproj +++ /dev/null @@ -1,111 +0,0 @@ - - - - - Debug - AnyCPU - {6266982D-4807-4619-A71D-1440D0B6B6F4} - Library - VisualBasicUsesCSharpRefReturn - VisualBasicUsesCSharpRefReturn - 512 - Windows - v4.8 - true - - - true - full - true - true - bin\Debug\ - VisualBasicUsesCSharpRefReturn.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - pdbonly - false - true - true - bin\Release\ - VisualBasicUsesCSharpRefReturn.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - VbMyResourcesResXFileCodeGenerator - Resources.Designer.vb - My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.vb - - - SettingsSingleFileGenerator - My - Settings.Designer.vb - - - - - {39A0B42C-38C5-0F53-0E16-D1FFBA52E129} - CSharpRefReturn - - - - \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln index 3b7aec4e9..62d9b2f64 100644 --- a/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln +++ b/Tests/TestData/MultiFileCharacterization/SourceFiles/CharacterizationTestSolution.sln @@ -26,10 +26,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix. EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpRefReturn", "CSharpRefReturn\CSharpRefReturn.csproj", "{8B843547-F49D-40A2-8C4E-1B81D8C5D589}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicUsingCSharpRefReturn", "VisualBasicUsesCSharpRefReturn\VisualBasicUsingCSharpRefReturn.vbproj", "{6266982D-4807-4619-A71D-1440D0B6B6F4}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,14 +68,6 @@ Global {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.Build.0 = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln index eb084b477..bb2bf81ad 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertVbLibraryOnly/CharacterizationTestSolution.sln @@ -26,10 +26,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Prefix.VbLibrary", "Prefix. EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.vbproj", "{C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpRefReturn", "CSharpRefReturn\CSharpRefReturn.csproj", "{8B843547-F49D-40A2-8C4E-1B81D8C5D589}" -EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VisualBasicUsingCSharpRefReturn", "VisualBasicUsesCSharpRefReturn\VisualBasicUsingCSharpRefReturn.vbproj", "{6266982D-4807-4619-A71D-1440D0B6B6F4}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,14 +68,6 @@ Global {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Debug|Any CPU.Build.0 = Debug|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.ActiveCfg = Release|Any CPU {C69D27C1-FF4E-43CB-BB0F-9BF811BF0F81}.Release|Any CPU.Build.0 = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.Build.0 = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6266982D-4807-4619-A71D-1440D0B6B6F4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/CSharpRefReturn.csproj b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/CSharpRefReturn.csproj deleted file mode 100644 index 71e958a13..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/CSharpRefReturn.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - - Debug - AnyCPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589} - Library - Properties - CSharpRefReturn - CSharpRefReturn - v4.8 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/Properties/AssemblyInfo.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/Properties/AssemblyInfo.cs deleted file mode 100644 index c6a300242..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CSharpRefReturn")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CSharpRefReturn")] -[assembly: AssemblyCopyright("Copyright © 2024")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8b843547-f49d-40a2-8c4e-1b81d8c5d589")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/RefReturnList.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/RefReturnList.cs deleted file mode 100644 index 5e0398d50..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CSharpRefReturn/RefReturnList.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CSharpRefReturn -{ - public class RefReturnList - { - private T dummy; - public ref T this[int i] { - get { - return ref dummy; - } - } - } -} diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CharacterizationTestSolution.sln b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CharacterizationTestSolution.sln index 8405b463b..364b36658 100644 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CharacterizationTestSolution.sln +++ b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/CharacterizationTestSolution.sln @@ -26,10 +26,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prefix.VbLibrary", "Prefix. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualBasicConsoleApp", "ConsoleApp1\VisualBasicConsoleApp.csproj", "{74B9A6AA-3316-0C3A-3957-518673283B21}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpRefReturn", "CSharpRefReturn\CSharpRefReturn.csproj", "{8B843547-F49D-40A2-8C4E-1B81D8C5D589}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualBasicUsingCSharpRefReturn", "VisualBasicUsesCSharpRefReturn\VisualBasicUsingCSharpRefReturn.csproj", "{D0421946-845F-09E8-2545-DE3EB2218254}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -72,14 +68,6 @@ Global {74B9A6AA-3316-0C3A-3957-518673283B21}.Debug|Any CPU.Build.0 = Debug|Any CPU {74B9A6AA-3316-0C3A-3957-518673283B21}.Release|Any CPU.ActiveCfg = Release|Any CPU {74B9A6AA-3316-0C3A-3957-518673283B21}.Release|Any CPU.Build.0 = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B843547-F49D-40A2-8C4E-1B81D8C5D589}.Release|Any CPU.Build.0 = Release|Any CPU - {D0421946-845F-09E8-2545-DE3EB2218254}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D0421946-845F-09E8-2545-DE3EB2218254}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D0421946-845F-09E8-2545-DE3EB2218254}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D0421946-845F-09E8-2545-DE3EB2218254}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/ByRefArgument.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/ByRefArgument.cs deleted file mode 100644 index d0bc1dcd2..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/ByRefArgument.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.VisualBasic.CompilerServices; - -namespace VisualBasicUsesCSharpRefReturn -{ - public class ByRefArgument - { - public void UseArr() - { - var arrObj = default(object[]); - Modify(ref arrObj[0]); - - var arrInt = default(int[]); - var tmp = arrInt; - object argo = tmp[0]; - Modify(ref argo); - tmp[0] = Conversions.ToInteger(argo); - } - - public void UseRefReturn() - { - var lstObj = default(CSharpRefReturn.RefReturnList); - Modify(ref lstObj[0]); - Modify(ref lstObj.RefProperty); - - var lstInt = default(CSharpRefReturn.RefReturnList); - var tmp = lstInt; - object argo = tmp[0]; - Modify(ref argo); - tmp[0] = Conversions.ToInteger(argo); - object argo1 = lstInt.RefProperty; - Modify(ref argo1); - lstInt.RefProperty = Conversions.ToInteger(argo1); - } - - public void Modify(ref object o) - { - } - } -} \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/Application.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/Application.Designer.cs deleted file mode 100644 index 5e9e2a074..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/Application.Designer.cs +++ /dev/null @@ -1,11 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - - diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/AssemblyInfo.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/AssemblyInfo.cs deleted file mode 100644 index c10fc5b96..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. - -// Review the values of the assembly attributes - -[assembly: AssemblyTitle("VisualBasicUsesCSharpRefReturn")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("VisualBasicUsesCSharpRefReturn")] -[assembly: AssemblyCopyright("Copyright © 2024")] -[assembly: AssemblyTrademark("")] - -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("47520bc8-6837-4f63-9aef-0a252d368f05")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.1.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.1.Designer.cs deleted file mode 100644 index 259c509e1..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.1.Designer.cs +++ /dev/null @@ -1,468 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Diagnostics; -using Microsoft.VisualBasic; - -/* TODO ERROR: Skipped IfDirectiveTrivia -#If TARGET = "module" AndAlso _MYTYPE = "" Then -*//* TODO ERROR: Skipped DisabledTextTrivia -#Const _MYTYPE="Empty" -*//* TODO ERROR: Skipped EndIfDirectiveTrivia -#End If -*/ -/* TODO ERROR: Skipped IfDirectiveTrivia -#If _MYTYPE = "WindowsForms" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -#Const _MYFORMS = True -#Const _MYWEBSERVICES = True -#Const _MYUSERTYPE = "Windows" -#Const _MYCOMPUTERTYPE = "Windows" -#Const _MYAPPLICATIONTYPE = "WindowsForms" - -*//* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE = "WindowsFormsWithCustomSubMain" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -#Const _MYFORMS = True -#Const _MYWEBSERVICES = True -#Const _MYUSERTYPE = "Windows" -#Const _MYCOMPUTERTYPE = "Windows" -#Const _MYAPPLICATIONTYPE = "Console" - -*//* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE = "Windows" OrElse _MYTYPE = "" Then -*/ -/* TODO ERROR: Skipped DefineDirectiveTrivia -#Const _MYWEBSERVICES = True -*//* TODO ERROR: Skipped DefineDirectiveTrivia -#Const _MYUSERTYPE = "Windows" -*//* TODO ERROR: Skipped DefineDirectiveTrivia -#Const _MYCOMPUTERTYPE = "Windows" -*//* TODO ERROR: Skipped DefineDirectiveTrivia -#Const _MYAPPLICATIONTYPE = "Windows" -*/ -/* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE = "Console" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -#Const _MYWEBSERVICES = True -#Const _MYUSERTYPE = "Windows" -#Const _MYCOMPUTERTYPE = "Windows" -#Const _MYAPPLICATIONTYPE = "Console" - -*//* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE = "Web" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -#Const _MYFORMS = False -#Const _MYWEBSERVICES = False -#Const _MYUSERTYPE = "Web" -#Const _MYCOMPUTERTYPE = "Web" - -*//* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE = "WebControl" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -#Const _MYFORMS = False -#Const _MYWEBSERVICES = True -#Const _MYUSERTYPE = "Web" -#Const _MYCOMPUTERTYPE = "Web" - -*//* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE = "Custom" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -*//* TODO ERROR: Skipped ElifDirectiveTrivia -#ElseIf _MYTYPE <> "Empty" Then -*//* TODO ERROR: Skipped DisabledTextTrivia - -#Const _MYTYPE = "Empty" - -*//* TODO ERROR: Skipped EndIfDirectiveTrivia -#End If -*/ -/* TODO ERROR: Skipped IfDirectiveTrivia -#If _MYTYPE <> "Empty" Then -*/ -namespace VisualBasicUsesCSharpRefReturn.My -{ - - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYAPPLICATIONTYPE = "WindowsForms" OrElse _MYAPPLICATIONTYPE = "Windows" OrElse _MYAPPLICATIONTYPE = "Console" Then - */ - [System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYAPPLICATIONTYPE = "WindowsForms" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - Inherits Global.Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase - #If TARGET = "winexe" Then - _ - Friend Shared Sub Main(ByVal Args As String()) - Try - Global.System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(MyApplication.UseCompatibleTextRendering()) - Finally - End Try - My.Application.Run(Args) - End Sub - #End If - - *//* TODO ERROR: Skipped ElifDirectiveTrivia - #ElseIf _MYAPPLICATIONTYPE = "Windows" Then - */ - internal partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.ApplicationBase - { - /* TODO ERROR: Skipped ElifDirectiveTrivia - #ElseIf _MYAPPLICATIONTYPE = "Console" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - Inherits Global.Microsoft.VisualBasic.ApplicationServices.ConsoleApplicationBase - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If '_MYAPPLICATIONTYPE = "WindowsForms" - */ - } - - /* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If '#If _MYAPPLICATIONTYPE = "WindowsForms" Or _MYAPPLICATIONTYPE = "Windows" or _MYAPPLICATIONTYPE = "Console" - */ - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYCOMPUTERTYPE <> "" Then - */ - [System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYCOMPUTERTYPE = "Windows" Then - */ - internal partial class MyComputer : Microsoft.VisualBasic.Devices.Computer - { - /* TODO ERROR: Skipped ElifDirectiveTrivia - #ElseIf _MYCOMPUTERTYPE = "Web" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - Inherits Global.Microsoft.VisualBasic.Devices.ServerComputer - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - [DebuggerHidden()] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public MyComputer() : base() - { - } - } - /* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - [HideModuleName()] - [System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")] - internal static class MyProject - { - - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYCOMPUTERTYPE <> "" Then - */ - [System.ComponentModel.Design.HelpKeyword("My.Computer")] - internal static MyComputer Computer - { - [DebuggerHidden()] - get - { - return m_ComputerObjectProvider.GetInstance; - } - } - - private readonly static ThreadSafeObjectProvider m_ComputerObjectProvider = new ThreadSafeObjectProvider(); - /* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYAPPLICATIONTYPE = "Windows" Or _MYAPPLICATIONTYPE = "WindowsForms" Or _MYAPPLICATIONTYPE = "Console" Then - */ - [System.ComponentModel.Design.HelpKeyword("My.Application")] - internal static MyApplication Application - { - [DebuggerHidden()] - get - { - return m_AppObjectProvider.GetInstance; - } - } - private readonly static ThreadSafeObjectProvider m_AppObjectProvider = new ThreadSafeObjectProvider(); - /* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYUSERTYPE = "Windows" Then - */ - [System.ComponentModel.Design.HelpKeyword("My.User")] - internal static Microsoft.VisualBasic.ApplicationServices.User User - { - [DebuggerHidden()] - get - { - return m_UserObjectProvider.GetInstance; - } - } - private readonly static ThreadSafeObjectProvider m_UserObjectProvider = new ThreadSafeObjectProvider(); - /* TODO ERROR: Skipped ElifDirectiveTrivia - #ElseIf _MYUSERTYPE = "Web" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - _ - Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser - _ - Get - Return m_UserObjectProvider.GetInstance() - End Get - End Property - Private ReadOnly m_UserObjectProvider As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.WebUser) - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYFORMS = True Then - *//* TODO ERROR: Skipped DisabledTextTrivia - - #Const STARTUP_MY_FORM_FACTORY = "My.MyProject.Forms" - - _ - Friend ReadOnly Property Forms() As MyForms - _ - Get - Return m_MyFormsObjectProvider.GetInstance() - End Get - End Property - - _ - _ - Friend NotInheritable Class MyForms - _ - Private Shared Function Create__Instance__(Of T As {New, Global.System.Windows.Forms.Form})(ByVal Instance As T) As T - If Instance Is Nothing OrElse Instance.IsDisposed Then - If m_FormBeingCreated IsNot Nothing Then - If m_FormBeingCreated.ContainsKey(GetType(T)) = True Then - Throw New Global.System.InvalidOperationException(Global.Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_RecursiveFormCreate")) - End If - Else - m_FormBeingCreated = New Global.System.Collections.Hashtable() - End If - m_FormBeingCreated.Add(GetType(T), Nothing) - Try - Return New T() - Catch ex As Global.System.Reflection.TargetInvocationException When ex.InnerException IsNot Nothing - Dim BetterMessage As String = Global.Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_SeeInnerException", ex.InnerException.Message) - Throw New Global.System.InvalidOperationException(BetterMessage, ex.InnerException) - Finally - m_FormBeingCreated.Remove(GetType(T)) - End Try - Else - Return Instance - End If - End Function - - _ - Private Sub Dispose__Instance__(Of T As Global.System.Windows.Forms.Form)(ByRef instance As T) - instance.Dispose() - instance = Nothing - End Sub - - _ - _ - Public Sub New() - MyBase.New() - End Sub - - Private Shared m_FormBeingCreated As Global.System.Collections.Hashtable - - Public Overrides Function Equals(ByVal o As Object) As Boolean - Return MyBase.Equals(o) - End Function - Public Overrides Function GetHashCode() As Integer - Return MyBase.GetHashCode - End Function - _ - Friend Overloads Function [GetType]() As Global.System.Type - Return GetType(MyForms) - End Function - Public Overrides Function ToString() As String - Return MyBase.ToString - End Function - End Class - - Private m_MyFormsObjectProvider As New ThreadSafeObjectProvider(Of MyForms) - - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYWEBSERVICES = True Then - */ - [System.ComponentModel.Design.HelpKeyword("My.WebServices")] - internal static MyWebServices WebServices - { - [DebuggerHidden()] - get - { - return m_MyWebServicesObjectProvider.GetInstance; - } - } - - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")] - internal sealed class MyWebServices - { - - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [DebuggerHidden()] - public override bool Equals(object o) - { - return base.Equals(o); - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [DebuggerHidden()] - public override int GetHashCode() - { - return base.GetHashCode(); - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [DebuggerHidden()] - internal new Type GetType() - { - return typeof(MyWebServices); - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [DebuggerHidden()] - public override string ToString() - { - return base.ToString(); - } - - [DebuggerHidden()] - private static T Create__Instance__(T instance) where T : new() - { - if (instance is null) - { - return new T(); - } - else - { - return instance; - } - } - - [DebuggerHidden()] - private void Dispose__Instance__(ref T instance) - { - instance = default(T); - } - - [DebuggerHidden()] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public MyWebServices() : base() - { - } - } - - private readonly static ThreadSafeObjectProvider m_MyWebServicesObjectProvider = new ThreadSafeObjectProvider(); - /* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MYTYPE = "Web" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - - _ - Friend ReadOnly Property Request() As Global.System.Web.HttpRequest - _ - Get - Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current - If CurrentContext IsNot Nothing Then - Return CurrentContext.Request - End If - Return Nothing - End Get - End Property - - _ - Friend ReadOnly Property Response() As Global.System.Web.HttpResponse - _ - Get - Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current - If CurrentContext IsNot Nothing Then - Return CurrentContext.Response - End If - Return Nothing - End Get - End Property - - _ - Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.AspLog - _ - Get - Return m_LogObjectProvider.GetInstance() - End Get - End Property - - Private ReadOnly m_LogObjectProvider As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.AspLog) - - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If '_MYTYPE="Web" - */ - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [System.Runtime.InteropServices.ComVisible(false)] - internal sealed class ThreadSafeObjectProvider where T : new() - { - internal T GetInstance - { - /* TODO ERROR: Skipped IfDirectiveTrivia - #If TARGET = "library" Then - */ - [DebuggerHidden()] - get - { - var Value = m_Context.Value; - if (Value is null) - { - Value = new T(); - m_Context.Value = Value; - } - return Value; - } - /* TODO ERROR: Skipped ElseDirectiveTrivia - #Else - *//* TODO ERROR: Skipped DisabledTextTrivia - _ - Get - If m_ThreadStaticValue Is Nothing Then m_ThreadStaticValue = New T - Return m_ThreadStaticValue - End Get - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - } - - [DebuggerHidden()] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public ThreadSafeObjectProvider() : base() - { - } - - /* TODO ERROR: Skipped IfDirectiveTrivia - #If TARGET = "library" Then - */ - private readonly Microsoft.VisualBasic.MyServices.Internal.ContextValue m_Context = new Microsoft.VisualBasic.MyServices.Internal.ContextValue(); - /* TODO ERROR: Skipped ElseDirectiveTrivia - #Else - *//* TODO ERROR: Skipped DisabledTextTrivia - Private Shared m_ThreadStaticValue As T - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - } - } -} -/* TODO ERROR: Skipped EndIfDirectiveTrivia -#End If -*/ \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.2.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.2.Designer.cs deleted file mode 100644 index 01e385026..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.2.Designer.cs +++ /dev/null @@ -1,242 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Data; -using System.Diagnostics; -using System.Linq; -using System.Xml.Linq; -using Microsoft.VisualBasic; -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// See Compiler::LoadXmlSolutionExtension -namespace VisualBasicUsesCSharpRefReturn.My -{ - [Embedded()] - [DebuggerNonUserCode()] - [System.Runtime.CompilerServices.CompilerGenerated()] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - internal sealed class InternalXmlHelper - { - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - private InternalXmlHelper() - { - } - public static string get_Value(IEnumerable source) - { - foreach (XElement item in source) - return item.Value; - return null; - } - - public static void set_Value(IEnumerable source, string value) - { - foreach (XElement item in source) - { - item.Value = value; - break; - } - } - public static string get_AttributeValue(IEnumerable source, XName name) - { - foreach (XElement item in source) - return (string)item.Attribute(name); - return null; - } - - public static void set_AttributeValue(IEnumerable source, XName name, string value) - { - foreach (XElement item in source) - { - item.SetAttributeValue(name, value); - break; - } - } - public static string get_AttributeValue(XElement source, XName name) - { - return (string)source.Attribute(name); - } - - public static void set_AttributeValue(XElement source, XName name, string value) - { - source.SetAttributeValue(name, value); - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static XAttribute CreateAttribute(XName name, object value) - { - if (value is null) - { - return null; - } - return new XAttribute(name, value); - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static XAttribute CreateNamespaceAttribute(XName name, XNamespace ns) - { - var a = new XAttribute(name, ns.NamespaceName); - a.AddAnnotation(ns); - return a; - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static object RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List attributes, object obj) - { - if (obj is not null) - { - XElement elem = obj as XElement; - if (elem is not null) - { - return RemoveNamespaceAttributes(inScopePrefixes, inScopeNs, attributes, elem); - } - else - { - IEnumerable elems = obj as IEnumerable; - if (elems is not null) - { - return RemoveNamespaceAttributes(inScopePrefixes, inScopeNs, attributes, elems); - } - } - } - return obj; - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static IEnumerable RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List attributes, IEnumerable obj) - { - if (obj is not null) - { - IEnumerable elems = obj as IEnumerable; - if (elems is not null) - { - return elems.Select(new RemoveNamespaceAttributesClosure(inScopePrefixes, inScopeNs, attributes).ProcessXElement); - } - else - { - return obj.Cast().Select(new RemoveNamespaceAttributesClosure(inScopePrefixes, inScopeNs, attributes).ProcessObject); - } - } - return obj; - } - [DebuggerNonUserCode()] - [System.Runtime.CompilerServices.CompilerGenerated()] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - private sealed class RemoveNamespaceAttributesClosure - { - private readonly string[] m_inScopePrefixes; - private readonly XNamespace[] m_inScopeNs; - private readonly List m_attributes; - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - internal RemoveNamespaceAttributesClosure(string[] inScopePrefixes, XNamespace[] inScopeNs, List attributes) - { - m_inScopePrefixes = inScopePrefixes; - m_inScopeNs = inScopeNs; - m_attributes = attributes; - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - internal XElement ProcessXElement(XElement elem) - { - return RemoveNamespaceAttributes(m_inScopePrefixes, m_inScopeNs, m_attributes, elem); - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - internal object ProcessObject(object obj) - { - XElement elem = obj as XElement; - if (elem is not null) - { - return RemoveNamespaceAttributes(m_inScopePrefixes, m_inScopeNs, m_attributes, elem); - } - else - { - return obj; - } - } - } - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - public static XElement RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List attributes, XElement e) - { - if (e is not null) - { - var a = e.FirstAttribute; - - while (a is not null) - { - var nextA = a.NextAttribute; - - if (a.IsNamespaceDeclaration) - { - var ns = a.Annotation(); - string prefix = a.Name.LocalName; - - if (ns is not null) - { - if (inScopePrefixes is not null && inScopeNs is not null) - { - int lastIndex = inScopePrefixes.Length - 1; - - for (int i = 0, loopTo = lastIndex; i <= loopTo; i++) - { - string currentInScopePrefix = inScopePrefixes[i]; - var currentInScopeNs = inScopeNs[i]; - if (prefix.Equals(currentInScopePrefix)) - { - if (ns == currentInScopeNs) - { - // prefix and namespace match. Remove the unneeded ns attribute - a.Remove(); - } - - // prefix is in scope but refers to something else. Leave the ns attribute. - a = null; - break; - } - } - } - - if (a is not null) - { - // Prefix is not in scope - // Now check whether it's going to be in scope because it is in the attributes list - - if (attributes is not null) - { - int lastIndex = attributes.Count - 1; - for (int i = 0, loopTo1 = lastIndex; i <= loopTo1; i++) - { - var currentA = attributes[i]; - string currentInScopePrefix = currentA.Name.LocalName; - var currentInScopeNs = currentA.Annotation(); - if (currentInScopeNs is not null) - { - if (prefix.Equals(currentInScopePrefix)) - { - if (ns == currentInScopeNs) - { - // prefix and namespace match. Remove the unneeded ns attribute - a.Remove(); - } - - // prefix is in scope but refers to something else. Leave the ns attribute. - a = null; - break; - } - } - } - } - - if (a is not null) - { - // Prefix is definitely not in scope - a.Remove(); - // namespace is not defined either. Add this attributes list - attributes.Add(a); - } - } - } - } - - a = nextA; - } - } - return e; - } - - } -} \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.3.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.3.Designer.cs deleted file mode 100644 index e39b42043..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/MyNamespace.Static.3.Designer.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.VisualBasic -{ - [Embedded()] - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Module | AttributeTargets.Assembly, Inherited = false)] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] - [System.Runtime.CompilerServices.CompilerGenerated()] - internal sealed class Embedded : Attribute - { - } -} \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/Settings.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/Settings.Designer.cs deleted file mode 100644 index 4023833b9..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/My Project/Settings.Designer.cs +++ /dev/null @@ -1,88 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -using System.Diagnostics; -using Microsoft.VisualBasic; - - -namespace VisualBasicUsesCSharpRefReturn.My -{ - - [System.Runtime.CompilerServices.CompilerGenerated()] - [System.CodeDom.Compiler.GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] - internal sealed partial class MySettings : System.Configuration.ApplicationSettingsBase - { - - private static MySettings defaultInstance = (MySettings)Synchronized(new MySettings()); - - #region My.Settings Auto-Save Functionality - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MyType = "WindowsForms" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - #endregion - - public static MySettings Default - { - get - { - - /* TODO ERROR: Skipped IfDirectiveTrivia - #If _MyType = "WindowsForms" Then - *//* TODO ERROR: Skipped DisabledTextTrivia - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If - *//* TODO ERROR: Skipped EndIfDirectiveTrivia - #End If - */ - return defaultInstance; - } - } - } -} - -namespace VisualBasicUsesCSharpRefReturn.My -{ - - [HideModuleName()] - [DebuggerNonUserCode()] - [System.Runtime.CompilerServices.CompilerGenerated()] - internal static class MySettingsProperty - { - - [System.ComponentModel.Design.HelpKeyword("My.Settings")] - internal static MySettings Settings - { - get - { - return MySettings.Default; - } - } - } -} \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/Resources.Designer.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/Resources.Designer.cs deleted file mode 100644 index 480dcb9a8..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/Resources.Designer.cs +++ /dev/null @@ -1,70 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -using System.Diagnostics; -using Microsoft.VisualBasic; - - -namespace VisualBasicUsesCSharpRefReturn.My.Resources -{ - - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - [System.CodeDom.Compiler.GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [DebuggerNonUserCode()] - [System.Runtime.CompilerServices.CompilerGenerated()] - [HideModuleName()] - internal static class Resources - { - - private static System.Resources.ResourceManager resourceMan; - - private static System.Globalization.CultureInfo resourceCulture; - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Resources.ResourceManager ResourceManager - { - get - { - if (ReferenceEquals(resourceMan, null)) - { - var temp = new System.Resources.ResourceManager("VisualBasicUsesCSharpRefReturn.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)] - internal static System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/Resources.resx b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/Resources.resx deleted file mode 100644 index af7dbebba..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/VisualBasicUsingCSharpRefReturn.csproj b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/VisualBasicUsingCSharpRefReturn.csproj deleted file mode 100644 index 8b2a8df24..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/VisualBasicUsingCSharpRefReturn.csproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - AnyCPU - {D0421946-845F-09E8-2545-DE3EB2218254} - Library - VisualBasicUsesCSharpRefReturn - VisualBasicUsesCSharpRefReturn - 512 - Windows - v4.8 - true - $(DefaultItemExcludes);$(ProjectDir)**\*.vb - latest - - - true - full - bin\Debug\ - bin\Debug\VisualBasicUsesCSharpRefReturn.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - TRACE;DEBUG - - - pdbonly - true - bin\Release\ - bin\Release\VisualBasicUsesCSharpRefReturn.xml - 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 - TRACE - - - On - - - Binary - - - Off - - - On - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - Application.myapp - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - VisualBasicUsesCSharpRefReturn.My.Resources - Designer - - - - - MyApplicationCodeGenerator - Application.Designer.cs - - - SettingsSingleFileGenerator - VisualBasicUsesCSharpRefReturn.My - Settings.Designer.cs - - - - - {8b843547-f49d-40a2-8c4e-1b81d8c5d589} - CSharpRefReturn - - - - \ No newline at end of file diff --git a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs b/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs deleted file mode 100644 index 45caf235e..000000000 --- a/Tests/TestData/MultiFileCharacterization/VBToCSResults/ConvertWholeSolution/VisualBasicUsesCSharpRefReturn/WithRefReturnStructure.cs +++ /dev/null @@ -1,34 +0,0 @@ - -namespace VisualBasicUsesCSharpRefReturn -{ - public class WithRefReturnStructure - { - public void UseArr() - { - var arr = default(SomeStruct[]); - var s = default(string); - - { - ref var withBlock = ref arr[0]; - withBlock.P = s; - s = withBlock.P; - } - } - - public void UseRefReturn() - { - CSharpRefReturn.RefReturnList lst; - string s; - - // With lst(0) - // .P = s - // s = .P - // End With - } - - public struct SomeStruct - { - public string P { get; set; } - } - } -} \ No newline at end of file