CollectionSource = collectionSource;
}
- public StatementSyntax GenerateClearManagedSource(TypePositionInfo info, StubCodeContext context)
+ public StatementSyntax GenerateClearUnmanagedDestination(TypePositionInfo info, StubCodeContext context)
{
// <GetUnmanagedValuesDestination>.Clear();
return ExpressionStatement(
{
// 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))
{
// 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;
}