* Fix EqualityExtensions handling of enumerables
The CheckSequenceEquals method is erroneously testing an enumerable against itself rather than against the intended other. Luckily this didn't mask any failures in existing test data, but it does in new test data being added.
* Fix serialization of arrays containing DateTimes
When DateTimes are serialized individually, DateTime's serialization ctor/GetObjectData are used. But when it's serialized as part of an array, a different path is taken that serializes it via a separate BinaryFormatter-specific "I know what this type is" mechanism, and that's currently dropping the Kind information from the DateTime, due to the necessary API on DateTime being internal and not available to BinaryFormatter.
Commit migrated from https://github.com/dotnet/corefx/commit/0b613fa6ffc60e80754346c1ea5f97a17f6aa3dd
* Initial check-in for System.Text.Json library and solution
* Auto-generate the reference assembly
* Provide an overview README and roadmap
* Change the solution GUID to be unique
* Fix package description nit
* Change to MIT license instead of GPL
* Fix file extension of images to png
* Address PR feedback and only support netcoreapp
* Fix the configuration props and project files
* Add comments to the JsonTokenType enum
* Add an internal class for commonly used constants when reading JSON.
* Add a comment handling enum for lenient JSON reading
* Add a JsonReaderOptions struct to provide extensible customization of
JsonReader behaviour
* Add a JsonReaderException class which is thrown when we see an invalid
JSON text
* Add the skeleton for the JsonUtf8Reader ref struct and add files to
csproj
* Add JsonReaderState, ThrowHelper, and Strings resource file
* Address PR feedback, remove OS-specific configurations
* Complete the implementation of core JsonReader APIs for reading spans
* Update the reference assembly by auto-generating it
* Add unit tests and TryGet APIs
* Add XML comments to describe the JsonUtf8Reader at a high level
* Fix config and csproj to reference S.R.CS.U from Corelib
* Rename type from JsonUtf8Reader to Utf8JsonReader
* Remove remnants of ReadOnlySequeunce related fields/properties
* Add the remaining TryGetValueAsX APIs
* Change JsonReaderState ctor to accept JsonReaderOptions instead
* Seal the JsonReaderException class
* Rename LineBytePosition to BytePositionInLine
* Fix typo in ArrayEndWithinObject exception message
* Capitalize the acronym JSON within exception messages.
* Override GetObjectData and add a private deserialization ctor on
JsonReaderException
* Be explicit with lessThan in the IndexOfAny call site
* Only use ulong when Options isn't AllowComments to align stack usage
* Rename IndexOfAny helper to IndexOfOrLessThan
* Remove stray comment and fix xml comment for BytesConsumed
* Braces everywhere
* Rename localCopy to localBuffer to tie it to _buffer
* Add IsDigit and IsHexDigit helper methods
* Rename Solidus to Slash, ReverseSolidus to BackSlash, and Use Asterisk constant
* Use static encoder and avoid unnecessary allocation.
* Combine multiple TryParse calls that only differ by standardFormat
* Use SR.Format instead of string.Format and add debug.fail for default
case
* Make the exception as serializable and add test to BinaryFormatterTestData
* Fix exception messages, avoid printing control characters, and remove
unnecessary else.
* Make sure all exception messages are consistent and that they make sense
in context.
* Fix and add new comments, rename internal enum values, and remove
JsonLab
* Throw InvalidCastException from TryGetAsX if token type doesn't match
* Resolve TODOs, add issues, fix search for end of string, and remove recursive calls + add more tests.
* Use Unicode escape sequences for non-ASCII characters in tests.
* Add more tests related to skipping and consuming comments.
* Allocate the stack lazily, only when depth actually surpasses 64.
* Add a netcoreapp config to
System.Runtime.Serialization.Formatters.Tests.csproj
* Remove unnecessary DefineConstants property in test csproj
* Use Invariant Culture where necessary to avoid tests failing on es-ES
machines
* Fix up nits in the exception messages
* Add an IsTokenTypePrimitive helper method and fix comment spelling
* Use helper, use while(true) instead of goto, and change TryGet methods
to throw InvalidOperationException
* Shorten CommentHandling enum values and rename Default to Disallow
* Fix "is the stack empty" check in EndObject/EndArray
* Add previous token type to state and update it when token type is not a
comment
* Include comment delimiters as part of comment token, fix Debug.Assert
and tests.
* Add helper to avoid code duplication
* Add temporary workaround for Utf8 double parsing issue
Commit migrated from https://github.com/dotnet/corefx/commit/43759525e9a01fb9caedc0fb2281db5c65a16f65
* Make Image, Bitmap, Metafile and Icon serializable
* Fix build error because of different namings on Unix & Windows
* Add Unix MemoryStream handling for serialization
* Simplify Icon deserialization logic
* Fix rename build break
* Fix build break again
* Add serialization tests for System.Drawing types
* Remove unnecessary null check in Icon
* Remove Debug fail invocations in Image deserialization
* Disable blob comparison for Drawing types
* Disable system.drawing.common binary formatter tests for uap since is a turd assembly
* Fix nano failures
* Fix typo in FindEncoderForFormat call
* Fix Windows test failures
* Fix unix deserialization where nativeImage pointer was not being set and update blobs
* Update metafile comment on why we skip it
Commit migrated from https://github.com/dotnet/corefx/commit/11c54f3bd947b8ceb41b51440379c49cf777248f
* Add serializable attribute and typeforward and adding serialization impl
* Expose ZLibException in impl assembly
* Remove deserialization negative tests
* Adding tests for exceptions
* Adding SqlError data to base exception data table
* System Data Facade
* Add netfx471 blob diffs for Hashtable and ListDictionary
* Build Microsoft.NETCore.App.deps.json after manual shims
* Disable currently failing uap/uapaot tests because of shim assembly load errors
Commit migrated from https://github.com/dotnet/corefx/commit/e3f74deb999571d3f34a6b2b8011caebcf06dbfc
* Adding cross framework serialization and blob sanity check for serializable Exception types
* Add AggregateException equality check and check InnerException of Exception type
* Refine test data for exceptions
* Manual StackTrace override for Exception serialization tests
* Improved exception serialization data
Commit migrated from https://github.com/dotnet/corefx/commit/a534c0ebbd3c5741f97590ece32f1b31645f0994
* wip: add stubs for custom isEqual
* Updated blobs, small code refactoring, disabled CookieContainer test
* Fixed netfx471 detection
* add custom equals for graph with cycles
* fix few more comparers
* Merge
* fix few more test cases
* fix few more types, fix GetExtensionMethod to work with parameters with same type name but different generic params
* finish tests (2 comparisons are commented out: search for TODO)
* Adding TypeForward for DictionaryNode
* Updating blobs
* Update Cookie hashes, adding TypeForwards, removing unnecessary equality checks for CookieCollection
* Reenabling SortedDictionary test
* Update blobs
* make cookie.Timestamp to roundtrip correctly
* regenerate netfx and corefx blobs to account for Cookie.Timestamp change
* make regex fix the blob for ObjectWithArray
* fix ObjectWithArray netfx test failure
* Replacing Dictionary with Hashtable for desktop serialization support
* Update blobs
* Fixing a lot of TypeForwards, adding another hashtable test, other fixes
* Adding a few more TypeForwardedFrom attributes
* Updating the coreclr version, disabling CookieContainer test
* Update blobs
* Disabling CompareInfo test --> waiting for coreclr
* generate test cases
* update blobs, comment out not working cases
* fix null equality checks for new test cases and reenable them
* PR feedback addressed
* Fixed a typo...
* Updating used coreclr version, enabling compareinfo test again
Commit migrated from https://github.com/dotnet/corefx/commit/cdfb6ecf11cae3f43d35233852ef422cb12ef3d8
* Fix byreflike test for UAPAOT
* More fixes for UAP AOT BinaryFormatter tests:
* Making Cookie serialize correctly (I'm not sure why this wasn't needed for CoreCLR)
* More rd.xml
* Avoid private reflection in the test Comparer comparison
Commit migrated from https://github.com/dotnet/corefx/commit/c1fe8a8352ba633abfad979ea2be6ade428f505b
Serialization of a WeakReference is dubious at best, as when it's deserialized, there won't be any strong references to the deserialized object it wraps, such that it's then immediately available for GC and will likely be gone by the time we go to look at it.
Commit migrated from https://github.com/dotnet/corefx/commit/f63e19aeb31d92eef0713572bf39877fcdb21b40