Linus Hamlin
Linus Hamlin
Another issue with `GetOffset` returning offset from the original (unsliced) ReadOnlySequence is that it makes `ReadOnlySequence.GetPosition(long offset)` not roundtripping (or failing). Example: ``` var original = new ReadOnlySequence(new byte[2]); var...
This behaviour was introduced by https://github.com/dotnet/extensions/pull/4277, so it seems to be intentional. The documentation for FakeTimeProvider could be clearer on this.
Hm, suppose this was implemented like in [comment](https://github.com/dotnet/runtime/issues/23337#issuecomment-956383197). If a class would implement both `IReadOnlyCollection` and `ICollection` and not explicitly implement `IReadOnlyCollection.Count`, then it must be using DIMs. But what...
Sure, I can pick it up if @i3arnon who has a PR doesn't want to. Will keep an eye out for when generic math is potentially ready for this change.
Is it a good idea to perhaps add method like this too (not sure about naming) that would return false if span is too small or the bytes are invalidl...
@WashingtonARamos yeah it's currently not supported. Using EnumMemberAttribute for System.Text.Json was tracked in #31081 Workaround I found in that issue is to use https://www.nuget.org/packages/Macross.Json.Extensions/ and JsonStringEnumMemberConverter to the converters until...
What is the expected behaviour? Some notes: - Constructor `JsonObject(IEnumerable, Nullable)` throws on duplicate keys. - Deserializing POCOs with duplicate keys will use the last value (given `JsonSerializerOptions.AllowDuplicateProperties == true`)....
But there is no nice way of normalizing / trimming trailing franctional zeros at the moment. Options I guess are either formatting then parsing, alternatively (as proposed in https://stackoverflow.com/questions/4525854/remove-trailing-zeros/7983330#7983330): x...
Updated suggestion to have the method named `Canonicalize`
Another use (for which we use the workaround in production code at my current project), is canonicalizing user input (without rounding, just removing trailnig zeros).