Commit Graph
462 Commits
Author SHA1 Message Date
Stanislav Ushakov ac76a68271 Removed global suppression of CS1573 and CS1591 warnings (dotnet/corefx#34232)
* Removed global suppression of CS1573 and CS1591, moved suppression to the project level.

* Fixes for netfx build, added 2 projects


Commit migrated from https://github.com/dotnet/corefx/commit/adb4d48fe65d48b6dd1c2ff15c8a60e5f96bf266
2018-12-24 12:17:29 -05:00
Stephen Toub 7097b4fc3b Add BinaryFormatter and TypedReference test involving struct with readonly field (dotnet/corefx#33690)
* Add BinaryFormatter test involving struct with readonly field

* Add MakeTypedReference test for readonly field


Commit migrated from https://github.com/dotnet/corefx/commit/1197641767c4c281ddcd38d3bf3bf6b2bb79abca
2018-11-27 12:55:21 -05:00
Viktor Hofer 976ee8955e Fix IsDrawingSupported condition and streamline code
Fix unix IsDrawingSupported & rename helper method in Drawing


Commit migrated from https://github.com/dotnet/corefx/commit/64c979d70525f7113880c1f07f6165d860f30962
2018-11-19 13:14:44 -08:00
Santiago Fernandez Madero 7124cbb852 Add missing TypeForwardedFromAttribute to System.Drawing serializable types (dotnet/corefx#33499)
Commit migrated from https://github.com/dotnet/corefx/commit/711a1040709bdb2150f5bae2ef2604755d94d10a
2018-11-15 15:09:03 -05:00
Stephen Toub 6c61c2b55c Fix BinaryFormatter serialization of arrays containing DateTimes (dotnet/corefx#33466)
* 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
2018-11-13 22:34:49 +01:00
Viktor Hofer e9327f501c Make Font serializable (dotnet/corefx#33445)
Commit migrated from https://github.com/dotnet/corefx/commit/6e55e0fa6711a15e1e02a6948532979a142c993b
2018-11-13 15:38:57 +01:00
Maryam Ariyan f09a0545b7 Expose ArgIterator (dotnet/corefx#33369)
Expose ArgIterator

Adding IsArgIteratorSupported and IsArgIteratorNotSupported for tests

Asserts PNSE when not supported

Fixes: dotnet/corefx#32898

Commit migrated from https://github.com/dotnet/corefx/commit/e9d7a5f20120d77941b72763336f4455bd175ec7
2018-11-12 08:30:19 -08:00
Ahson Khan 714a878eb7 Add JsonUtf8Reader (for ReadOnlySpan) along with unit tests (dotnet/corefx#33216)
* 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
2018-11-09 02:53:01 -08:00
Wes Haggard 954fb511b3 Rename AssemblyKey properties to StrongNameKeyId as part of arcade work
Commit migrated from https://github.com/dotnet/corefx/commit/7edd861bf2dd59ecdb4284e0fd291d7458198a9d
2018-10-30 15:14:01 -07:00
Wes Haggard 5d69a0e45d Test now have Open key so update some tests related to that.
Commit migrated from https://github.com/dotnet/corefx/commit/cf9c77ffa9fdc30fe39d4e9cec8fdcd0355ae290
2018-10-29 09:24:27 -07:00
Jan Kotas 005c064038 Mark tests exercising CoreLib with TestRuntime tag (dotnet/corefx#32720)
Commit migrated from https://github.com/dotnet/corefx/commit/6b299367382b28ec0b9592bf5b37db48fb02cb67
2018-10-09 12:51:04 -07:00
Jeremy Koritzinsky 3ac2fd663b Update SafeBuffer Initialize tests to reflect new exception type. (dotnet/corefx#32487)
Commit migrated from https://github.com/dotnet/corefx/commit/b1cf64ba71f0c1f81154fa297358b9583611a229
2018-09-28 20:17:57 +02:00
Viktor Hofer 01fdc8d3d5 Make Image, Bitmap, Metafile and Icon serializable (dotnet/corefx#30817)
* 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
2018-09-13 13:45:37 -07:00
Santiago Fernandez Madero 6201f73b0d Remove ActiveIssue from serialization test (dotnet/corefx#31947)
Commit migrated from https://github.com/dotnet/corefx/commit/8f897b247a49db435e23847056e20b3d22c8cf0d
2018-08-24 15:43:32 -07:00
Viktor Hofer 49586efb0d Add uap test leg to CI
Disable/Enable tests for clean uap CI leg


Commit migrated from https://github.com/dotnet/corefx/commit/c54d4a20c315730cd76fb7688c15d0a85837f3ce
2018-08-23 20:16:11 +02:00
Santiago Fernandez Madero 278e0dfc0f Prep key enums for binary serialization (dotnet/corefx#31641)
* Prep key enums for binary serialization

* Add enum blobs to formatter test data;

* Set correct blobs


Commit migrated from https://github.com/dotnet/corefx/commit/8ce7ff4f04bf288dca6d89a27e3e48cf096b7b46
2018-08-09 21:01:09 -07:00
Viktor Hofer a9f00560f8 Use IEqualityComparer<T> instead of IComparer<T> during HashSet serialization (dotnet/corefx#30912)
* Use IEqualityComparer<T> instead of IComparer<T> during HashSet serialization

* Enable type value assignability check for serializable types

* Enable typeobject integrity for netfx


Commit migrated from https://github.com/dotnet/corefx/commit/fe5927a0f68717223528220c891a3b02d7331829
2018-07-10 15:03:23 +02:00
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
Eric Erhardt 2053139c9a merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/1c91f96ec67a78a33268181d99a73a736b48c13e
2018-06-15 22:24:40 -05:00
Viktor Hofer 5a7c1ee516 Add netfx472 serialization blobs and cleanup code to fix failing PRs (dotnet/corefx#30394)
* Add netfx472 serialization blobs and cleanup code

* Add check if net472 is patched


Commit migrated from https://github.com/dotnet/corefx/commit/7c1dc969ce02cfab1dbb241800abbd7a3c9a0155
2018-06-16 00:08:28 +02:00
Eric Erhardt 1df03e5bbd Rename dir files to Directory.Build
dir.props => Directory.Build.props
dir.targets => Directory.Build.targets


Commit migrated from https://github.com/dotnet/corefx/commit/204a8dbbc23bfc51d419c93f2f2ddaf50db8020f
2018-06-15 17:07:48 -05:00
Eric Erhardt 70091b9c8b Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ad505eb98c6a887db2d2932fec256d9e4e394169
2018-06-11 17:20:10 -05:00
Stephen Toub 2ed60d5cdb Use nameof in more places (dotnet/corefx#30228)
I'd previously scrubbed the repo for places nameof could be used.  A lot more code has come into the repo since then, so I'm rescrubbing.

Commit migrated from https://github.com/dotnet/corefx/commit/54d15abce387fc7ea4cd9546179c4a955ff5ea85
2018-06-11 11:37:10 -04:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Stephen Toub 437016087d Remove unnecessary NoInlining uses (dotnet/corefx#29801)
Commit migrated from https://github.com/dotnet/corefx/commit/28f6f35d6465486b0b014332d7c3733d5e5f30e0
2018-05-19 19:14:05 -04:00
Viktor Hofer 2e43c34745 Porting roslyn regex tests to corefx (dotnet/corefx#29178)
* 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
2018-05-01 16:06:13 +02:00
Eric St. John 8fcddacb0e Update for new API compat operand names
Commit migrated from https://github.com/dotnet/corefx/commit/a9f347950a1526b28f4577f2dbf94c23b3123d5c
2018-04-25 14:26:00 -07:00
Viktor Hofer b3563d6409 Move Hashtable & friends to shared parition
Include serialization info table for Hashtable

Remove hashtable & hashprovider src link


Commit migrated from https://github.com/dotnet/corefx/commit/e9c970589cb365a9b53e2868fc7ba1b3d4bd22e8
2018-04-25 13:18:38 +02:00
Marco Rossignoli 87da9705a6 De-duplicate resource ID's to make Mono merge easier (dotnet/corefx#29280)
* wip

* wip

* wip

* fix System.Linq.Expressions

* revert for tests

* add powershell script

* address PR feedback

* address PR feedbacl

* address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/5a37188238e90d8566e6161b43ac483a671bb7d2
2018-04-24 13:58:42 -07:00
Anirudh Agnihotry 1cbb2edb36 Disabling just the failing object (dotnet/corefx#29000)
Commit migrated from https://github.com/dotnet/corefx/commit/3dd98d8d79ab8ed670e7fc2162bf296460ad5c4b
2018-04-18 14:53:00 -04:00
Santiago Fernandez Madero 3eb7825416 Update netfx queues to use rs3 machines with .net471 installed (dotnet/corefx#28572)
* 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
2018-04-04 17:26:23 -05:00
Viktor Hofer a38e98f9b5 Reuse HashHelpers for BinaryFormatter objectholder hashes (dotnet/corefx#25509)
* Reuse HashHelpers for BinaryFormatter objectholder hashes

* Revert "Merge pull request dotnet/corefx#6203 from SunnyWar/master"

This reverts commit dotnet/corefx@ddf8ca0295, reversing
changes made to dotnet/corefx@0a0ea7fe57.

* Change resource string, make HashTable reuse existing HashHelper

* Add comment describing hash number growth

* Add hash number growth tests for BinaryFormatter & HashSet

* Disable tests on x86 because of OOMs


Commit migrated from https://github.com/dotnet/corefx/commit/b6b5982f475e2f0b3fb31a941f2561ffd3465c0a
2018-03-29 00:38:05 +02:00
Alexander Radchenko eeda23bfed Fixed netfx System.Runtime.Serialization.Formatters.Tests fails on non-English Windows (dotnet/corefx#28386)
Commit migrated from https://github.com/dotnet/corefx/commit/f3768a7ee2726d0c070bc8c0bd8873d6cc52df7e
2018-03-22 23:01:05 -04:00
Wes Haggard 9d1c79a09d Add comments to baseline files for known differences
Commit migrated from https://github.com/dotnet/corefx/commit/8677cc59fe02a58b9c0fb5a0e0009e119fd3cbe5
2018-03-09 15:43:30 -08:00
Wes Haggard 4d97955681 Consolidate matching ref generated baseline files
This change collapses some baseline files as well as fixes
some of the reference mis-matches


Commit migrated from https://github.com/dotnet/corefx/commit/8842923d3d6bc357d39b34c93353df952ac02079
2018-03-09 15:43:29 -08:00
Wes Haggard dccc06ade2 Baseline all reverse apicompat issues
Commit migrated from https://github.com/dotnet/corefx/commit/ddb31b5d2f393cf1a16653ff99736a6f25cd98b5
2018-03-09 15:43:29 -08:00
Anirudh Agnihotry 7ea972a654 Support added for 2.0 and 2.1 blobs (dotnet/corefx#27399)
Commit migrated from https://github.com/dotnet/corefx/commit/6c5a24394309297e03581cd72daefe83ea5f0903
2018-03-02 23:52:50 -08:00
Marco Rossignoli b11ba00852 Scrub error messages for missing arguments(throw new) (dotnet/corefx#27553)
* fix error message missing argument

* address PR feedback

* fix tests

* address PR feedback

* address PR feedback

* fix syntax


Commit migrated from https://github.com/dotnet/corefx/commit/fbe2ff101137abed0bc7fa67f40491d277088a79
2018-02-28 23:20:16 -05:00
Viktor Hofer 7dea4811b6 Enable blob comparison for TimeZoneInfo* & fix comment (dotnet/corefx#26647)
Commit migrated from https://github.com/dotnet/corefx/commit/541582ae4a1a861ffd3f280bbcf537a77a6337cb
2018-02-24 17:45:56 -08:00
Anirudh Agnihotry 7552566520 Tests for StringComparer Create(culture, CompareOptions) overload (dotnet/corefx#27051)
Commit migrated from https://github.com/dotnet/corefx/commit/e2fc82a68ba26767c2b0aa8e766573c32a422088
2018-02-23 10:38:19 -08:00
dotnet-maestro-bot 3561fd513c Update BuildTools, CoreClr, CoreFx, CoreSetup, ProjectNTfs, ProjectNTfsTestILC to preview2-02521-03, preview2-26221-06, preview2-26221-05, preview2-26220-02, beta-26221-00, beta-26221-00, respectively (master) (dotnet/corefx#27289)
* Update BuildTools, CoreClr, CoreFx, CoreSetup, ProjectNTfs, ProjectNTfsTestILC to preview2-02521-03, preview2-26221-06, preview2-26221-05, preview2-26220-02, beta-26221-00, beta-26221-00, respectively

* Fix test data for System.Runtime.Serialization.Formatters BinFormatTestData


Commit migrated from https://github.com/dotnet/corefx/commit/c6983b1597e0ab722082845519d3c8af9029e27f
2018-02-21 13:12:48 -08:00
Santiago Fernandez Madero b317fa70f6 Add System.Security.Permissions netfx facade and mark some APIs as obsolet to match desktop (dotnet/corefx#26758)
* Add System.Security.Permissions netfx facade and mark some APIs as obsolet to match desktop

* PR Feedback


Commit migrated from https://github.com/dotnet/corefx/commit/2ef483fd4aab623e54379be1292999c1fb39a3fa
2018-02-05 14:08:26 -08:00
Viktor Hofer 5697ca8910 Add tests for EventArgs serialization (dotnet/corefx#25940)
* Add tests for EventArgs serialization

* Add EventArgs equality check as the type doesn't provide its own check


Commit migrated from https://github.com/dotnet/corefx/commit/b1737de9d53386da84cff232304f7143b0998d47
2018-01-02 20:42:28 +01:00
Santiago Fernandez Madero f230741a96 Change PlatformDetection.GetFrameworkVersion() to use registry key value instead of minor build number (dotnet/corefx#26094)
* Change PlatformDetection.GetFrameworkVersion() to use registry key value instead of minor build number

* Address PR Feedback to do one liner getters


Commit migrated from https://github.com/dotnet/corefx/commit/0a131dd2dd4d408c47946a0928f5a9f2d709f6db
2017-12-30 02:02:03 -06:00
Jon Hanna 5ecc221cc7 Add license headers. (dotnet/corefx#26009)
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
2017-12-22 12:51:37 -06:00
stukselbax d752530099 Making Win32Exception.ToString() method contain NativeErrorCode (dotnet/corefx#25216)
* 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
2017-12-15 15:25:54 -08:00
Anirudh Agnihotry c5f5c45018 Concurrent Dictionary for BinaryFormatters (dotnet/corefx#25590)
* Using concurrent Dictionary for BinaryFormatters.GetTypeInfo

* TryAdd changed to GetOrAdd so that the same instance will be returned even if multiple threads race to it.


Commit migrated from https://github.com/dotnet/corefx/commit/190132d89e47d2623372485b207f4371e05529e1
2017-12-05 11:47:28 -08:00
Viktor Hofer e0403c3222 Add composition assembly to rd.xml to unblock reflection on exceptions (dotnet/corefx#25683)
Commit migrated from https://github.com/dotnet/corefx/commit/beefd9ab059f66988133e0821a08f80b705a683c
2017-12-04 13:42:29 -08:00
Viktor Hofer 72b37071cd Improve BinaryFormatter equality check logging (dotnet/corefx#25566)
* Improve Exception Assert logging

* Replace manual equality checks with Assert

* Add more test coverage for exceptions

* code style

* exclude two networking type checks


Commit migrated from https://github.com/dotnet/corefx/commit/fa80bd2e123652c1cba4fdbc9169f10aa9c1b2cd
2017-11-29 20:32:01 -08:00
Maryam Ariyan a63ea85fb5 Porting first half of the System.ComponentModel.Composition tests (dotnet/corefx#25437)
* Adding a portion of System.ComponentModel.Composition tests

Commit migrated from https://github.com/dotnet/corefx/commit/fed2d5ff6842b2ce932c70162f3e06a8d0304030
2017-11-28 20:07:39 -08:00