Add MediaType to BinaryData (#89605)
authorJoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Tue, 1 Aug 2023 23:09:27 +0000 (16:09 -0700)
committerGitHub <noreply@github.com>
Tue, 1 Aug 2023 23:09:27 +0000 (19:09 -0400)
commit99503f1cff0a3850ea8c2a66c7aca13e44f0fa3e
treee860265a1e18850d7a18804f7d68b74c9af44b03
parent4448e41d111f5e697701519274344aaf4ea24341
Add MediaType to BinaryData (#89605)

* Add BinaryData.ContentType

* PR fb

* Fix ctor formatting

* Add null validation for stream overloads

* Use Theory for tests

* More test updates

* couple more test cases for defaulting application/json

* more test clean up

---------

Co-authored-by: Alexander Radchenko <radchenkosasha@gmail.com>
src/libraries/System.Memory.Data/ref/System.Memory.Data.cs
src/libraries/System.Memory.Data/src/System/BinaryData.cs
src/libraries/System.Memory.Data/tests/BinaryDataTests.cs