Rename GeneratedClearManagedSource to correct name (#90537)
authorJackson Schuster <36744439+jtschuster@users.noreply.github.com>
Mon, 14 Aug 2023 22:24:44 +0000 (15:24 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Aug 2023 22:24:44 +0000 (15:24 -0700)
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/ElementsMarshalling.cs
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StatefulMarshallingStrategy.cs
src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/Marshalling/StatelessMarshallingStrategy.cs

index 10c7d7a..e4a86b4 100644 (file)
@@ -28,7 +28,7 @@ namespace Microsoft.Interop
             CollectionSource = collectionSource;
         }
 
-        public StatementSyntax GenerateClearManagedSource(TypePositionInfo info, StubCodeContext context)
+        public StatementSyntax GenerateClearUnmanagedDestination(TypePositionInfo info, StubCodeContext context)
         {
             // <GetUnmanagedValuesDestination>.Clear();
             return ExpressionStatement(
index 22c1c33..62e9698 100644 (file)
@@ -438,7 +438,7 @@ namespace Microsoft.Interop
             {
                 // If the parameter is marshalled by-value [Out], then we don't marshal the contents of the collection.
                 // We do clear the span, so that if the invoke target doesn't fill it, we aren't left with undefined content.
-                yield return _elementsMarshalling.GenerateClearManagedSource(info, context);
+                yield return _elementsMarshalling.GenerateClearUnmanagedDestination(info, context);
                 yield break;
             }
             if (context.Direction == MarshalDirection.UnmanagedToManaged && !info.IsByRef && info.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
index 2ed2653..b8e0c5b 100644 (file)
@@ -673,7 +673,7 @@ namespace Microsoft.Interop
             {
                 // If the parameter is marshalled by-value [Out], then we don't marshal the contents of the collection.
                 // We do clear the span, so that if the invoke target doesn't fill it, we aren't left with undefined content.
-                yield return _elementsMarshalling.GenerateClearManagedSource(info, context);
+                yield return _elementsMarshalling.GenerateClearUnmanagedDestination(info, context);
                 yield break;
             }