* 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 regex roslyn tests
* Offset & serialization in exception, remove internal error in error enum, compile parser tests on netfx
* Move match parser tests over to RegexParserTests
* Add subexpression parsing
* Add test case for SetType in RegexParseException
Commit migrated from https://github.com/dotnet/corefx/commit/455f969867ee332bf1793cbf55db136ef7833087
* Update netfx queues to use rs3 machines with .net471 installed
* Use Open queue for CI runs
* Official build netfx queues to RS2 to match CI runs
* Disable BinaryFormatterTests.ValidateAgainstBlobs for NETFX
* Fix RSA EncrypDecrypt test for netfx
Commit migrated from https://github.com/dotnet/corefx/commit/5d669ef9823a20ec589fc3b7d47a7f5aa1070893
Any *.cs file found without the usual license header has it added except:
1. Files that note they are auto-generated.
2. Files with a different header (unless it is very close to the usual,
in which case adjust for typos and old versions).
3. FxCopBaseline.cs files.
Commit migrated from https://github.com/dotnet/corefx/commit/e5da05d7100a64ab1d98c865436a1fb8b0ddd507
* Making Win32Excpetion.ToString() method more useful by adding NativeErrorCode
* Cache StackTrace to local variable
* corefx-24892 Change binary formater test data for WebSocketException and the string representation of Win32Exception
* corefx-24892 Add condition for full framework in test
Commit migrated from https://github.com/dotnet/corefx/commit/272b278727e5654f41a218779793132f92404fa1
* 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
* Use stackalloc directly into Span
We have a few places in corefx where we were stackalloc'ing into a temporary pointer and then creating a Span from that. Now that we're using a C# compiler which supports stackalloc'ing directly into span, use that feature instead.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/a7f6f470cb2c4cdaafdc3ad85e2520992a8db265
* 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
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly
The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.
* Fix Linux BB
* Update the xunit package reference
* Fix wrong condition on one of the tests
* Update the ConditionalFact/Theory to use Type as a parameter
Commit migrated from https://github.com/dotnet/corefx/commit/878e2fcf5a9f1068015e5fada9231088663e3490
* Fix serialization tests to handle a couple of AoT differences:
1. AoT doesn't return ByteEqualityComparer from EqualityComparer<byte>.Default, so create it with reflection instead
2. CoreCLR changes the _version field of List differently than both AoT and NetFX, so pass arrays to the IEnumerable constructor of a few collections, which causes the _version fields to agree. Also updates the stored blobs to reflect this.
Commit migrated from https://github.com/dotnet/corefx/commit/7639beea9ff8be752b46bbe084093cd43bec6e35