* Fix filename typo
* Disable Bitmap round-tripping tests for old libgdiplus versions
Old libgdiplus versions have uninitialized stack variable bug that makes Bitmap round-tripping unreliable. The bug causes Bitmap.Flags, Bitmap.HorizontalResolution and Bitmap.VerticalResolution properties to be set to bogus values if the stack happens to contain certain bit patterns. This bug was fixed for libgdiplus 6 by https://github.com/mono/libgdiplus/commit/81e45a1d5a3ac3cf035bcc3fabb2859818b6cc04#diff-c96a8261ecb168c12b44248208da21c0R118.
* Fix and simplify gdiplus library loading
Many of our RemoteInvokes are there purely because of needing to change the current thread culture but on UAP that actually impacting the whole process. Until that's addressed, we can at least avoid the RemoteInvoke on all platforms other than UAP. There are also some RemoteInvokes that can be avoided by just serializing all of the (small number of) tests in a test assembly. And there's some additional cleanup to be done as well around not explicitly returning an exit code unless required.
This helps measurably with test performance. Consider the System.ComponentModel.Annotations test suite. On my machine, prior to these changes, it took ~25 seconds; after these changes, it takes ~0.3. It helps even more when running against a checked runtime, where all of our test costs are magnified. With a checked runtime, prior to these changes, it takes ~196 seconds; after these changes, it takes ~2.5 seconds. This should help measurably with CI time in coreclr.
Commit migrated from https://github.com/dotnet/corefx/commit/cd18bafbabf7fe47601f6f790d157409034a2477
Mechanical/automated change. The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.
Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
* Making Exceptions serializable
* Remove EventLog serialization exceptions from tests since they won't work on non-Windows platforms
* Fix build and add internal exceptions as well
* Add parameter-less constructor to RethrowException
* Adding PR Feedback
* Fix allConfigurations build
Commit migrated from https://github.com/dotnet/corefx/commit/7075587321a1b6b59248b1a6c7ea04fc803eab96
* Add SyncSortedList serialization tests and remove SyncRoot
* Disable blob comparison for SyncSortedList
On UWP we get different blobs for SyncSortedList as reflection behaves
differently as the amount of types that we tests is less than in
.NET Core and .NET Framework. The order of fields that are serialized
into the payload are different in such a case.
Therefore we just disable the blob comparison for this type entirely.
Commit migrated from https://github.com/dotnet/corefx/commit/de591233c04efa019ea2aed0a8fc5181f6d4210b
* 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
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
* 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
* 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