Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ArrayMarshaller and PointerArrayMarshaller #68173

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Apr 18, 2022

Resolves #66623

This just moves the types, renames PtrArrayMarshaller -> PointerArrayMarshaller, and adds doc. I didn't change the actual implementation of the marshallers or how they are used.

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost ghost assigned elinor-fung Apr 18, 2022
@ghost
Copy link

ghost commented Apr 18, 2022

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

Resolves #66623

This just moves the types, renames PtrArrayMarshaller -> PointerArrayMarshaller, and adds doc. I didn't change the actual implementation remains the same.

Author: elinor-fung
Assignees: -
Labels:

area-System.Runtime.InteropServices

Milestone: 7.0.0

@jkoritzinsky
Copy link
Member

We should also remove this code block now that we're exposing the types:

// TODO: Remove once helper types (like ArrayMarshaller) are part of the runtime
// This check is to help with enabling the source generator for runtime libraries without making each
// library directly reference System.Memory and System.Runtime.CompilerServices.Unsafe unless it needs to
if (p.MarshallingAttributeInfo is MissingSupportMarshallingInfo
&& (environment.TargetFramework == TargetFramework.Net && environment.TargetFrameworkVersion.Major >= 7))
{
throw new MarshallingNotSupportedException(p, this);
}

Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with my one comment

@elinor-fung elinor-fung merged commit 0b39dee into dotnet:main Apr 19, 2022
@elinor-fung elinor-fung deleted the arrayMarshallers branch April 19, 2022 17:15
directhex pushed a commit to directhex/runtime that referenced this pull request Apr 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Implementations of marshallers using CustomTypeMarshallerAttribute
2 participants