Remove BestFitMapping, CallingConvention, and ThrowOnUnmappableChar from GeneratedDll...
authorElinor Fung <elfung@microsoft.com>
Sat, 6 Nov 2021 04:24:50 +0000 (21:24 -0700)
committerGitHub <noreply@github.com>
Sat, 6 Nov 2021 04:24:50 +0000 (21:24 -0700)
17 files changed:
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.LookupPrivilegeValue.cs
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegCreateKeyEx.cs
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteKeyEx.cs
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegDeleteValue.cs
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegFlushKey.cs
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegOpenKeyEx.cs
src/libraries/Common/src/Interop/Windows/Advapi32/Interop.RegSetValueEx.cs
src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetFullPathNameW.cs
src/libraries/Common/src/Interop/Windows/Kernel32/Interop.GetLongPathNameW.cs
src/libraries/Common/src/System/Runtime/InteropServices/GeneratedDllImportAttribute.cs
src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj
src/libraries/Microsoft.Win32.Registry/tests/Microsoft.Win32.Registry.Tests.csproj
src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/DllImportGenerator.cs
src/libraries/System.Runtime.InteropServices/gen/DllImportGenerator/GeneratedDllImportData.cs
src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/CodeSnippets.cs
src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/CompileFails.cs
src/libraries/System.Runtime.InteropServices/tests/DllImportGenerator.UnitTests/Compiles.cs

index c4276f4..7781cf4 100644 (file)
@@ -7,13 +7,8 @@ internal static partial class Interop
 {
     internal static partial class Advapi32
     {
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "LookupPrivilegeValueW", CharSet = CharSet.Unicode, SetLastError = true)]
         internal static partial bool LookupPrivilegeValue(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "LookupPrivilegeValueW", CharSet = CharSet.Unicode, SetLastError = true, BestFitMapping = false)]
-        internal static extern bool LookupPrivilegeValue(
-#endif
             [MarshalAs(UnmanagedType.LPTStr)] string? lpSystemName, [MarshalAs(UnmanagedType.LPTStr)] string lpName, out LUID lpLuid);
 
         internal const string SeDebugPrivilege = "SeDebugPrivilege";
index 44671dd..f376bc9 100644 (file)
@@ -14,13 +14,8 @@ internal static partial class Interop
     {
         // Note: RegCreateKeyEx won't set the last error on failure - it returns
         // an error code if it fails.
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegCreateKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegCreateKeyEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegCreateKeyExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegCreateKeyEx(
-#endif
             SafeRegistryHandle hKey,
             string lpSubKey,
             int Reserved,
index d7a5752..b511992 100644 (file)
@@ -12,13 +12,8 @@ internal static partial class Interop
 {
     internal static partial class Advapi32
     {
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegDeleteKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegDeleteKeyEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegDeleteKeyExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegDeleteKeyEx(
-#endif
             SafeRegistryHandle hKey,
             string lpSubKey,
             int samDesired,
index 50824a4..f5a8e05 100644 (file)
@@ -12,13 +12,8 @@ internal static partial class Interop
 {
     internal static partial class Advapi32
     {
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegDeleteValueW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegDeleteValue(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegDeleteValueW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegDeleteValue(
-#endif
             SafeRegistryHandle hKey,
             string? lpValueName);
     }
index 5bb1046..ce43f1a 100644 (file)
@@ -12,13 +12,7 @@ internal static partial class Interop
 {
     internal static partial class Advapi32
     {
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32)]
-        internal static partial int RegFlushKey(
-#else
-        [DllImport(Libraries.Advapi32)]
-        internal static extern int RegFlushKey(
-#endif
-            SafeRegistryHandle hKey);
+        internal static partial int RegFlushKey(SafeRegistryHandle hKey);
     }
 }
index 4ffba18..9f9af2c 100644 (file)
@@ -13,27 +13,16 @@ internal static partial class Interop
 {
     internal static partial class Advapi32
     {
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegOpenKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegOpenKeyEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegOpenKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegOpenKeyEx(
-#endif
             SafeRegistryHandle hKey,
             string? lpSubKey,
             int ulOptions,
             int samDesired,
             out SafeRegistryHandle hkResult);
 
-
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegOpenKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegOpenKeyEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegOpenKeyExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegOpenKeyEx(
-#endif
             IntPtr hKey,
             string? lpSubKey,
             int ulOptions,
index 8bb444a..5e2e922 100644 (file)
@@ -12,13 +12,8 @@ internal static partial class Interop
 {
     internal static partial class Advapi32
     {
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegSetValueEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegSetValueEx(
-#endif
             SafeRegistryHandle hKey,
             string? lpValueName,
             int Reserved,
@@ -26,13 +21,8 @@ internal static partial class Interop
             byte[]? lpData,
             int cbData);
 
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegSetValueEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegSetValueEx(
-#endif
             SafeRegistryHandle hKey,
             string? lpValueName,
             int Reserved,
@@ -40,13 +30,8 @@ internal static partial class Interop
             char[]? lpData,
             int cbData);
 
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegSetValueEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegSetValueEx(
-#endif
             SafeRegistryHandle hKey,
             string? lpValueName,
             int Reserved,
@@ -54,13 +39,8 @@ internal static partial class Interop
             ref int lpData,
             int cbData);
 
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegSetValueEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegSetValueEx(
-#endif
             SafeRegistryHandle hKey,
             string? lpValueName,
             int Reserved,
@@ -68,13 +48,8 @@ internal static partial class Interop
             ref long lpData,
             int cbData);
 
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", CharSet = CharSet.Unicode, ExactSpelling = true)]
         internal static partial int RegSetValueEx(
-#else
-        [DllImport(Libraries.Advapi32, EntryPoint = "RegSetValueExW", BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true)]
-        internal static extern int RegSetValueEx(
-#endif
             SafeRegistryHandle hKey,
             string? lpValueName,
             int Reserved,
index 191cfd6..69b6875 100644 (file)
@@ -11,13 +11,8 @@ internal static partial class Interop
         /// <summary>
         /// WARNING: This method does not implicitly handle long paths. Use GetFullPathName or PathHelper.
         /// </summary>
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
         internal static partial uint GetFullPathNameW(
-#else
-        [DllImport(Libraries.Kernel32, BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
-        internal static extern uint GetFullPathNameW(
-#endif
             ref char lpFileName,
             uint nBufferLength,
             ref char lpBuffer,
index 10d536d..1556e3f 100644 (file)
@@ -10,13 +10,8 @@ internal static partial class Interop
         /// <summary>
         /// WARNING: This method does not implicitly handle long paths. Use GetFullPath/PathHelper.
         /// </summary>
-#if DLLIMPORTGENERATOR_ENABLED
         [GeneratedDllImport(Libraries.Kernel32, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
         internal static partial uint GetLongPathNameW(
-#else
-        [DllImport(Libraries.Kernel32, BestFitMapping = false, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
-        internal static extern uint GetLongPathNameW(
-#endif
             ref char lpszShortPath,
             ref char lpszLongPath,
             uint cchBuffer);
index e6ae47a..e64fae1 100644 (file)
@@ -5,7 +5,6 @@
 
 //
 // Types in this file are used for generated p/invokes (docs/design/features/source-generator-pinvokes.md).
-// See the DllImportGenerator experiment in https://github.com/dotnet/runtimelab.
 //
 namespace System.Runtime.InteropServices
 {
@@ -20,14 +19,11 @@ namespace System.Runtime.InteropServices
 #endif
     sealed class GeneratedDllImportAttribute : Attribute
     {
-        public bool BestFitMapping { get; set; }
-        public CallingConvention CallingConvention { get; set; }
         public CharSet CharSet { get; set; }
         public string? EntryPoint { get; set; }
         public bool ExactSpelling { get; set; }
         public bool PreserveSig { get; set; }
         public bool SetLastError { get; set; }
-        public bool ThrowOnUnmappableChar { get; set; }
 
         public GeneratedDllImportAttribute(string dllName)
         {
index 2c5fa34..8fbb8dd 100644 (file)
@@ -81,6 +81,7 @@
     <Reference Include="System.Memory" />
     <Reference Include="System.Resources.ResourceManager" />
     <Reference Include="System.Runtime" />
+    <Reference Include="System.Runtime.CompilerServices.Unsafe" />
     <Reference Include="System.Runtime.Extensions" />
     <Reference Include="System.Runtime.InteropServices" />
   </ItemGroup>
index e88f97d..97452ac 100644 (file)
@@ -2,6 +2,8 @@
   <PropertyGroup>
     <DefineConstants>$(DefineConstants);REGISTRY_ASSEMBLY</DefineConstants>
     <TargetFrameworks>$(NetCoreAppCurrent)-windows</TargetFrameworks>
+    <EnableDllImportGenerator>true</EnableDllImportGenerator>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
index f69393e..7979638 100644 (file)
@@ -348,14 +348,11 @@ namespace Microsoft.Interop
             // documented semanatics of DllImportAttribute:
             //   - https://docs.microsoft.com/dotnet/api/system.runtime.interopservices.dllimportattribute
             DllImportMember userDefinedValues = DllImportMember.None;
-            bool bestFitMapping = false;
-            CallingConvention callingConvention = CallingConvention.Winapi;
             CharSet charSet = CharSet.Ansi;
             string? entryPoint = null;
             bool exactSpelling = false; // VB has different and unusual default behavior here.
             bool preserveSig = true;
             bool setLastError = false;
-            bool throwOnUnmappableChar = false;
 
             // All other data on attribute is defined as NamedArguments.
             foreach (KeyValuePair<string, TypedConstant> namedArg in attrData.NamedArguments)
@@ -365,14 +362,6 @@ namespace Microsoft.Interop
                     default:
                         Debug.Fail($"An unknown member was found on {GeneratedDllImport}");
                         continue;
-                    case nameof(GeneratedDllImportData.BestFitMapping):
-                        userDefinedValues |= DllImportMember.BestFitMapping;
-                        bestFitMapping = (bool)namedArg.Value.Value!;
-                        break;
-                    case nameof(GeneratedDllImportData.CallingConvention):
-                        userDefinedValues |= DllImportMember.CallingConvention;
-                        callingConvention = (CallingConvention)namedArg.Value.Value!;
-                        break;
                     case nameof(GeneratedDllImportData.CharSet):
                         userDefinedValues |= DllImportMember.CharSet;
                         charSet = (CharSet)namedArg.Value.Value!;
@@ -393,24 +382,17 @@ namespace Microsoft.Interop
                         userDefinedValues |= DllImportMember.SetLastError;
                         setLastError = (bool)namedArg.Value.Value!;
                         break;
-                    case nameof(GeneratedDllImportData.ThrowOnUnmappableChar):
-                        userDefinedValues |= DllImportMember.ThrowOnUnmappableChar;
-                        throwOnUnmappableChar = (bool)namedArg.Value.Value!;
-                        break;
                 }
             }
 
             return new GeneratedDllImportData(attrData.ConstructorArguments[0].Value!.ToString())
             {
                 IsUserDefined = userDefinedValues,
-                BestFitMapping = bestFitMapping,
-                CallingConvention = callingConvention,
                 CharSet = charSet,
                 EntryPoint = entryPoint,
                 ExactSpelling = exactSpelling,
                 PreserveSig = preserveSig,
                 SetLastError = setLastError,
-                ThrowOnUnmappableChar = throwOnUnmappableChar
             };
         }
 
@@ -452,31 +434,16 @@ namespace Microsoft.Interop
             // Process the GeneratedDllImport attribute
             GeneratedDllImportData stubDllImportData = ProcessGeneratedDllImportAttribute(generatedDllImportAttr!);
 
-            if (stubDllImportData.IsUserDefined.HasFlag(DllImportMember.BestFitMapping))
-            {
-                generatorDiagnostics.ReportConfigurationNotSupported(generatedDllImportAttr!, nameof(GeneratedDllImportData.BestFitMapping));
-            }
-
-            if (stubDllImportData.IsUserDefined.HasFlag(DllImportMember.ThrowOnUnmappableChar))
-            {
-                generatorDiagnostics.ReportConfigurationNotSupported(generatedDllImportAttr!, nameof(GeneratedDllImportData.ThrowOnUnmappableChar));
-            }
-
-            if (stubDllImportData.IsUserDefined.HasFlag(DllImportMember.CallingConvention))
-            {
-                generatorDiagnostics.ReportConfigurationNotSupported(generatedDllImportAttr!, nameof(GeneratedDllImportData.CallingConvention));
-            }
-
             if (lcidConversionAttr != null)
             {
                 // Using LCIDConversion with GeneratedDllImport is not supported
                 generatorDiagnostics.ReportConfigurationNotSupported(lcidConversionAttr, nameof(TypeNames.LCIDConversionAttribute));
             }
-            List<AttributeSyntax> additionalAttributes = GenerateSyntaxForForwardedAttributes(suppressGCTransitionAttribute, unmanagedCallConvAttribute);
 
             // Create the stub.
             var dllImportStub = DllImportStubContext.Create(symbol, stubDllImportData, environment, generatorDiagnostics, ct);
 
+            List<AttributeSyntax> additionalAttributes = GenerateSyntaxForForwardedAttributes(suppressGCTransitionAttribute, unmanagedCallConvAttribute);
             return new IncrementalStubGenerationContext(environment, dllImportStub, additionalAttributes.ToImmutableArray(), stubDllImportData, generatorDiagnostics.Diagnostics.ToImmutableArray());
         }
 
@@ -602,18 +569,6 @@ namespace Microsoft.Interop
                     CreateStringExpressionSyntax(targetDllImportData.EntryPoint!))
             };
 
-            if (targetDllImportData.IsUserDefined.HasFlag(DllImportMember.BestFitMapping))
-            {
-                NameEqualsSyntax name = NameEquals(nameof(DllImportAttribute.BestFitMapping));
-                ExpressionSyntax value = CreateBoolExpressionSyntax(targetDllImportData.BestFitMapping);
-                newAttributeArgs.Add(AttributeArgument(name, null, value));
-            }
-            if (targetDllImportData.IsUserDefined.HasFlag(DllImportMember.CallingConvention))
-            {
-                NameEqualsSyntax name = NameEquals(nameof(DllImportAttribute.CallingConvention));
-                ExpressionSyntax value = CreateEnumExpressionSyntax(targetDllImportData.CallingConvention);
-                newAttributeArgs.Add(AttributeArgument(name, null, value));
-            }
             if (targetDllImportData.IsUserDefined.HasFlag(DllImportMember.CharSet))
             {
                 NameEqualsSyntax name = NameEquals(nameof(DllImportAttribute.CharSet));
@@ -638,12 +593,6 @@ namespace Microsoft.Interop
                 ExpressionSyntax value = CreateBoolExpressionSyntax(targetDllImportData.SetLastError);
                 newAttributeArgs.Add(AttributeArgument(name, null, value));
             }
-            if (targetDllImportData.IsUserDefined.HasFlag(DllImportMember.ThrowOnUnmappableChar))
-            {
-                NameEqualsSyntax name = NameEquals(nameof(DllImportAttribute.ThrowOnUnmappableChar));
-                ExpressionSyntax value = CreateBoolExpressionSyntax(targetDllImportData.ThrowOnUnmappableChar);
-                newAttributeArgs.Add(AttributeArgument(name, null, value));
-            }
 
             // Create new attribute
             return Attribute(
@@ -691,13 +640,10 @@ namespace Microsoft.Interop
             var targetDllImportData = new GeneratedDllImportData(dllImportData.ModuleName)
             {
                 CharSet = dllImportData.CharSet,
-                BestFitMapping = dllImportData.BestFitMapping,
-                CallingConvention = dllImportData.CallingConvention,
                 EntryPoint = dllImportData.EntryPoint,
                 ExactSpelling = dllImportData.ExactSpelling,
                 SetLastError = dllImportData.SetLastError,
                 PreserveSig = dllImportData.PreserveSig,
-                ThrowOnUnmappableChar = dllImportData.ThrowOnUnmappableChar,
                 IsUserDefined = dllImportData.IsUserDefined & membersToForward
             };
 
index d315778..07d0dde 100644 (file)
@@ -15,14 +15,11 @@ namespace Microsoft.Interop
     public enum DllImportMember
     {
         None = 0,
-        BestFitMapping = 1 << 0,
-        CallingConvention = 1 << 1,
-        CharSet = 1 << 2,
-        EntryPoint = 1 << 3,
-        ExactSpelling = 1 << 4,
-        PreserveSig = 1 << 5,
-        SetLastError = 1 << 6,
-        ThrowOnUnmappableChar = 1 << 7,
+        CharSet = 1 << 0,
+        EntryPoint = 1 << 1,
+        ExactSpelling = 1 << 2,
+        PreserveSig = 1 << 3,
+        SetLastError = 1 << 4,
         All = ~None
     }
 
@@ -39,13 +36,10 @@ namespace Microsoft.Interop
         /// Value set by the user on the original declaration.
         /// </summary>
         public DllImportMember IsUserDefined { get; init; }
-        public bool BestFitMapping { get; init; }
-        public CallingConvention CallingConvention { get; init; }
         public CharSet CharSet { get; init; }
         public string? EntryPoint { get; init; }
         public bool ExactSpelling { get; init; }
         public bool PreserveSig { get; init; }
         public bool SetLastError { get; init; }
-        public bool ThrowOnUnmappableChar { get; init; }
     }
 }
index ce3a00f..42d3d9c 100644 (file)
@@ -184,29 +184,9 @@ partial class Test
 ";
 
         /// <summary>
-        /// Declaration with all DllImport named arguments.
+        /// Declaration with all GeneratedDllImport named arguments.
         /// </summary>
-        public static readonly string AllDllImportNamedArguments = @"
-using System.Runtime.InteropServices;
-partial class Test
-{
-    [GeneratedDllImport(""DoesNotExist"",
-        BestFitMapping = false,
-        CallingConvention = CallingConvention.Cdecl,
-        CharSet = CharSet.Unicode,
-        EntryPoint = ""UserDefinedEntryPoint"",
-        ExactSpelling = true,
-        PreserveSig = false,
-        SetLastError = true,
-        ThrowOnUnmappableChar = true)]
-    public static partial void Method();
-}
-";
-
-        /// <summary>
-        /// Declaration with all supported DllImport named arguments.
-        /// </summary>
-        public static readonly string AllSupportedDllImportNamedArguments = @"
+        public static readonly string AllGeneratedDllImportNamedArguments = @"
 using System.Runtime.InteropServices;
 partial class Test
 {
index 954009d..a69af45 100644 (file)
@@ -58,10 +58,6 @@ namespace DllImportGenerator.UnitTests
             yield return new object[] { CodeSnippets.ByValueParameterWithModifier<byte>("Out"), 1, 0 };
             yield return new object[] { CodeSnippets.ByValueParameterWithModifier<byte>("In, Out"), 1, 0 };
 
-            // Unsupported named arguments
-            //  * BestFitMapping, ThrowOnUnmappableChar, CallingConvention
-            yield return new object[] { CodeSnippets.AllDllImportNamedArguments, 3, 0 };
-
             // LCIDConversion
             yield return new object[] { CodeSnippets.LCIDConversionAttribute, 1, 0 };
 
index 69148af..0572d1d 100644 (file)
@@ -24,7 +24,7 @@ namespace DllImportGenerator.UnitTests
             yield return new[] { CodeSnippets.NestedTypes };
             yield return new[] { CodeSnippets.UnsafeContext };
             yield return new[] { CodeSnippets.UserDefinedEntryPoint };
-            yield return new[] { CodeSnippets.AllSupportedDllImportNamedArguments };
+            yield return new[] { CodeSnippets.AllGeneratedDllImportNamedArguments };
             yield return new[] { CodeSnippets.DefaultParameters };
             yield return new[] { CodeSnippets.UseCSharpFeaturesForConstants };
 
@@ -408,7 +408,7 @@ namespace DllImportGenerator.UnitTests
 
         public static IEnumerable<object[]> SnippetsWithBlittableTypesButNonBlittableDataToCompile()
         {
-            yield return new[] { CodeSnippets.AllSupportedDllImportNamedArguments };
+            yield return new[] { CodeSnippets.AllGeneratedDllImportNamedArguments };
             yield return new[] { CodeSnippets.BasicParametersAndModifiers<int>() };
             yield return new[] { CodeSnippets.PreserveSigFalse<int>() };
         }