Commit Graph
18 Commits
Author SHA1 Message Date
Ahson Khan 4fed6ab881 Auto-generate the reference assemblies and separate type forwards (dotnet/corefx#35557)
* Auto-generate the reference assemblies

* Add back type forwards.

* Revert "Add back type forwards."

This reverts commit dotnet/corefx@3acf74aabb.

* Add back TypeForwardedTo in .Forward.cs files

* Add new type forward files to the csproj files

* Add back if-defs and move TestUtilities comment from ref to source

* Remove duplicate definitions, delete unnecessary manual files,

* Fix build breaks

* Add back missing AsyncMethodBuilderAttr to S.Runtime ref

* Fix typo between XmlDocument and XPath.XDocument

* Add type forward fild missed from previous commit

* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1

* Remove "this type was moved to comments" from the type forwards.

* Add back the Xml and Debugger* attributes to Xml.ReaderWriter

* Add back struct layout attributes

* Add back attributes missing (highlighted from api compat)

* Add missing toolbox item attribute in s.data.common.

* Add missing struct layout attributes and remove unnecessary additions

* Add back InterfaceTypeAttribute


Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
2019-02-27 19:39:21 -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
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
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
Wes Haggard 4effd546bc Add ProjectGuids for all projects and empty configs for projects without BuildConfigurations
Commit migrated from https://github.com/dotnet/corefx/commit/d00bb5d18ac91189b12ed2fb7131d0ff62da9034
2017-02-02 15:02:57 -08:00
Eric St. John 2ef0e9bfd8 Sync PropertyGroups and BuildConfigurations
Commit migrated from https://github.com/dotnet/corefx/commit/7e4792af39bd7faba20dd3390b411f3afaee3c66
2017-01-30 13:23:56 -08:00
Alex Perovich 573869c47f Automated update of ns1.7->ns2.0 and nca1.1->nca2.0
Commit migrated from https://github.com/dotnet/corefx/commit/1f8b5264a8156f91c48b2dc344d5410ee6f574cb
2017-01-10 16:20:42 -08:00
Eric Mellino 966c8e0251 [dev/eng] Overhaul ref and src project references, and start binplacing things (dotnet/corefx#14062)
* Used GenerateBuilds.ps1 script to generate the P2P references from the project.json files in ref

* Update refs to build with ProjectReference's instead of package references

This deletes all the ref\project.json files and instead adds ProjectReference
to other refs that are used to build.

There is only one exception which was System.Net.Http which needed a project.json
to get the net46 targeting pack otherwise everything else is P2P.

* Update Reflection.Emit contracts to support latest version of contracts

* Add depproj to get windows.winmd support when building refs

* Special handle System.Net.Http ref project to deal with net46 targeting pack

* Moved CLSCompliant to SecureString ctor instead of type

* Add P2P reference from S.IO -> S.R.Extensions

* Add additional ProjectReferences to more ref projects after master rebase

* Start binplacing ref assemblies and disable rest of build

* Simplify all ref projects to only build for netcoreapp (default target group)

* Only binplace netcoreapp refs

* Allow Reference's to be resolved from targeting pack directories

* Use GenerateBuilds.ps1 to convert src project.json refs to References

* Allow overriding stuff in Tools

* System.Runtime src project building against targeting pack

* Re-purpose GenerateBuilds.ps1 to re-write src references

* Only build csproj files in src.builds

* More custom stuff in GenerateBuilds.ps1

* Binplace all netstandard assemblies into netcoreapp as well.

* Add project.json to System.Collections.Immutable

* More custom generatebuilds.ps1 stuff

* Normalize csproj files before running GenerateBuilds.ps1

* Better match the replaced  'None Include="project.json"' line.

* Another missing project.json inclusion in csproj

* Remove ExcludeFromCodeCoverageAttribute from Immutable project

* Include another project.json

* Add some P2P references

* Add another project.json include

* Disable Http.Rtc project.

* Disable two more UWP projects and another P2P ref"

* More Cleanup

* Run GenerateBuilds.ps1 to re-write all nuget refs as <Reference>'s

* Binplace netstandard runtime assemblies to netcoreapp as well.

* Re-hook all src projects into build.proj

* Fix bin clashing caused by bad ProjectReference metadata

* Use 'copy' instead of 'cp' in init-tools.cmd. Add copying to init-tools.sh as well.

* Correct casing of windows.winmd in depproj

* Disable System.Memory.csproj outside of Windows

* Fix unix exclusion of System.Memory, and include vbproj files

* Fix VisualBasic compilation

* There was an extra definition of MemberTypes that was internal to the
  assembly. It's now defined in System.Private.CoreLib, so I deleted the
  extra here.
* There was an invalid call in Operators.vb that I fixed.

* Add additional project references and configuration fixes after rebase

* Fix build warnings in ref projects

* Fix build warnings in src projects


Commit migrated from https://github.com/dotnet/corefx/commit/a9f6d7d749f9946cc6b10c50b54bcae0e43e859e
2016-11-29 18:01:35 -08:00
Stephen Toub ae342d8937 Remove stale P2P package references
A bunch of TODOs to be cleaned up.


Commit migrated from https://github.com/dotnet/corefx/commit/9c37cefc50161d980db141b026bb595933ccc796
2016-10-13 21:46:58 -04:00
Alex Perovich 674bb7a0f8 Update project ToolsVersions to 14.0 (dotnet/corefx#12355)
Commit migrated from https://github.com/dotnet/corefx/commit/71de1aac5cf3e5dc87714ae0cc829e1fa98f7c5d
2016-10-05 12:50:37 -07:00
Jose Perez Rodriguez 72a0d666a2 Adding Reflection changes back after merge from master (dotnet/corefx#11386)
Adding Reflection changes back after merge from master


Commit migrated from https://github.com/dotnet/corefx/commit/65e117580923503b1e970c95798f19baff568b5e
2016-09-03 14:00:39 -07:00
Jose Perez Rodriguez 6328e7431b Merge remote-tracking branch 'upstream/master' into dev/api
Commit migrated from https://github.com/dotnet/corefx/commit/ea0cc674b8116a10c18c2879390c39ec08df8020
2016-09-01 11:30:16 -07:00
Eric St. John e6e5ed7c59 Remove PackageTargetFramework usage
Commit migrated from https://github.com/dotnet/corefx/commit/c3042ed04fa3a246c544a7ead7d564b1d43e9862
2016-08-30 15:30:50 -07:00
Eric St. John 068e51cb68 Clean up redundant AssemblyVersion properties
These are now redundant to the property defined in src\<lib>\dir.props.


Commit migrated from https://github.com/dotnet/corefx/commit/765ea591f0dd0079e8f71125ca22c8f31d119528
2016-08-24 06:48:04 -07:00
Jose Perez Rodriguez a464fc82aa Fixing packages of S.Runtime, S.R.S.Primitives and S.R.S.Formatters
Commit migrated from https://github.com/dotnet/corefx/commit/17aa5578d9017d10618477d7eb8dc93d1ebdece1
2016-08-15 10:09:00 -07:00
Stephen Toub 687fdc4b4f Move serialization primitives to System.Runtime
We need BinaryFormatter to be able to serialize types from coreclr that use the various serialization types (e.g. ISerializable), which means those types must have the same identity as the ones BinaryFormatter recognizes, and we need a bunch of types all across corefx to be able to use these same types to implement serialization.  As such, the types are moving down to System.Runtime, and on coreclr, are type-forwarding to the implementations there.

There are a few outstanding issues:
- SR is not currently available in System.Runtime.  The few uses of SR in the versions of the code used for corert have been replaced by hardcoded strings and TODOs.
- Debug.Assert is not currently available in System.Runtime.  Asserts have been commented out with TODOs.
- To get things to build as types are moving around, P2P references are used.


Commit migrated from https://github.com/dotnet/corefx/commit/90be35920b48820536b8740f64d565ded55d811e
2016-08-15 09:47:08 -07:00
Eric St. John 3b1d041ed2 Bump versions across corefx and move to beta
Now that we have stable packages for our current versions we need to
bump the 3rd portion (bugfix) to represent code-changes without API
additions.


Commit migrated from https://github.com/dotnet/corefx/commit/92a411776004239482ba1b5032afc8483518810c
2016-06-16 16:03:53 -07:00
Krzysztof Cwalina bdc2980429 Adding Binary Serialization Programming Model
We decided to add binary serialization programming model (ISerializable, etc.) as an out of band package.
This will allow existing code implementing the SPM to compile for .NET Core without changes.

This is the ferst in a series of commits to ease porting of code involving serialization.
In subsequent commits, we are planing to:
1. Fill in the details of SerializationInfo
2. Add Exception.set_StackTrace
3. Add FormatterServices.GetUninitializedObject
4. Add BinaryFormatter (the exact semantics TBD)


Commit migrated from https://github.com/dotnet/corefx/commit/db70c8e2ba100b2f0f8fa1ace82dd1988200b269
2016-05-04 17:14:01 -07:00