Span<byte> data = stackalloc byte; if (!BitConverter.TryWriteBytes(data, nanos)) throw new InvalidOperationException("Failed to write nanoseconds."); if (!BitConverter.TryWriteBytes(data.Slice(4), seconds)) throw new InvalidOperationException("Failed to write seconds"); writer.WriteExtensionFormatHeader(new ExtensionHeader(typeCode: -1, length: 12)); writer.WriteRaw(data);
CS8350 This combination of arguments to 'MessagePackWriter.WriteRaw(ReadOnlySpan<byte>)' is disallowed because it may expose variables referenced by parameter 'rawMessagePackBlock' outside of their declaration scope
Spans in that method
MessagePackWritershould be a readonly struct
By the way, Could you revert this PR?
Page's first-view should show all the information.
Because users who does not know this lib(first visited users) see readme and does not click next pages.
We have to tell them the value of this library, forcefully.
Separated to many files are clean, but it is wothless.
Microsoft official library no need to think because microsoft-fans uses it without thinking.
But user created OSS is not.
Although this library is a latecomer and not to fluent in English, it is used by many people.
This is one of the reasons why I have successfully made OSS (I have 6 repositories of over 1000 stars).