sdk-csharp
sdk-csharp copied to clipboard
Centralize handling of strings and bytes arrays for event formatters
All event formatters are expected to handle strings and byte arrays. We should make it really easy for them to do so via common code, e.g. protected methods in CloudEventFormatter
.
This hasn't been done for 2.0; I still have the Protobuf event formatter to finish though, so when that's done it will give us more data.
Would this potentially let us inject things like https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream/blob/master/src/RecyclableMemoryStream.cs into the serialization? and remove the use of Encoding.GetBytes and Encoding.GetString etc? It's hard for me to see how I could do this without cloning the current class entirely
@bencyoung-Fignum: Honestly couldn't say yet - but maybe.