microsoft / microsoft/node-api-dotnet
Non-writeable MemoryStream shows up as Duplex rather than Readable
Open
@jasongin is already working on this.
Since Mar 14, 2025.
marshalling
- Dominant language
- C#
- Stars
- 783
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Per the the Stream docs, "A .NET Stream instance is marshalled to and from Node.js Duplex, Readable, or Writable, depending whether the stream supports reading and/or writing", however the following method:
public static Stream TestStream()
{
return new MemoryStream(System.Text.Encoding.UTF8.GetBytes("hello"), false);
}
...seems to return a Duplex, even though I'd expect a Readable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.