Commit Graph
458 Commits
Author SHA1 Message Date
Eric St. John 95a7c07d4b Fix configurations for UAP
These changes enable TargetGroup=UAP to build completely.


Commit migrated from https://github.com/dotnet/corefx/commit/17fdb439c50f4aa66a99f9b5549e9db923331e40
2017-01-31 06:27:49 -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
dstuckims fa7f8ad0ec ClientWebSocket(Managed): Allow user code to control the HTTP Host header (dotnet/corefx#15480)
* ClientWebSocket(Managed): Allow user code to control the HTTP Host header by calling clientWebSocket.Options.SetRequestHeader("Host", "www.example.com:443");

* Code Review Updates:

- Use " instead of " in XML doc comments.
- Use ternary operator.

* Fixing a copy/paste typo in last commit.

* More Code Review feedback updates and add a Unit Test.

* Update the unit test to use physical address like 'corefx-net.cloudapp.net' and logical address like 'subdomain.corefx-net.cloudapp.net' so that SSL Certificate validation works in WinHttp.

* Undo the change which updated WebSocketHandle.Managed to use the host header value for SSL certificate validation to make it consistent with the WinHttp WebSocket behavior.


Commit migrated from https://github.com/dotnet/corefx/commit/17473cbb1a33c1851bbfdd5083ae0d25bd7e553f
2017-01-27 00:23:20 -05:00
Jose Perez Rodriguez f9d4e6795d Removing netstandard configurations for things that are bellow netstandard (dotnet/corefx#15373)
Removing netstandard configurations for things that are bellow netstandard

Commit migrated from https://github.com/dotnet/corefx/commit/c656446f01db4b902b0c06b19551cc30d9dd9c6b
2017-01-24 09:40:19 -08:00
Lakshmi Priya Sekar fc1efe31a0 Merge pull request dotnet/corefx#15102 from Priya91/websocket
Provide websocket implementation for Managed httplistener.

Commit migrated from https://github.com/dotnet/corefx/commit/411bbe8762361df7c77c7828b12e4b92cd87118c
2017-01-20 11:49:16 -08:00
Jose Perez Rodriguez dd708b105d Adding missing Configurations.props for refs and fixing the existing ones (dotnet/corefx#15291)
Adding missing Configurations.props for refs and fixing the existing ones

Commit migrated from https://github.com/dotnet/corefx/commit/2847e0ec9f7c9ac42d44d2bc8c6fd39e504b7a9b
2017-01-19 16:38:55 -08:00
Eric StJohn 279d64fb9e Merge pull request dotnet/corefx#15312 from ericstj/packageCleanup3
Remove packages from NETStandard2.0

Commit migrated from https://github.com/dotnet/corefx/commit/06ddbb809ef1a1383245d63d6c667e43aadd786e
2017-01-19 13:53:14 -08:00
Eric St. John 2f1fa69d81 Add assemblies to NETCore.App if in netstandard
For every assembly that is forwarded to by netstandard.dll, ensure it is
a reference as part of NETCore.App


Commit migrated from https://github.com/dotnet/corefx/commit/f8e8cda1322b3252e519b323fa5cadc8e470ee5a
2017-01-18 21:10:21 -08:00
Eric St. John 774105be10 Remove packages from NETStandard2.0
Related to https://github.com/dotnet/corefx/commit/dotnet/corefx@0797813bfe3a9e6d04d4bfaa865b477bb26f8ce2

This removes packages where the types have been moved into
netstandard.dll in netstandard2.0.

These types are supported as follows:
1. In a netstandard2.0+ project via NETStandard.Library package's
    netstandard.dll
2. In a netstandard1.x project via contract assembly packages which
    ship from servicing branches.
3. In a framework specific project via the framework's targeting pack
    or framework package.


Commit migrated from https://github.com/dotnet/corefx/commit/99009fb3bc737af9d455ea0920b22347f69a78ff
2017-01-18 21:01:34 -08:00
Lakshmi Priya Sekar aa9b6b929a Move ThrowIfInvalidState method to WebSocketValidate.
Commit migrated from https://github.com/dotnet/corefx/commit/423758f46e8622132933e022416c3871e3f3a454
2017-01-17 15:33:03 -08:00
Lakshmi Priya Sekar c3d5a225dc Duplicate internal member to avoid build break.
Commit migrated from https://github.com/dotnet/corefx/commit/ad65f71f99fcd981aa77cf034d36f7007bd1f136
2017-01-17 15:33:03 -08:00
Lakshmi Priya Sekar c6098f194a Add test for websocket.
Commit migrated from https://github.com/dotnet/corefx/commit/11f61575101d1f76a709bd43b50474575604c425
2017-01-17 15:33:03 -08:00
Lakshmi Priya Sekar 0d7f4fa0da Move ManagedWebSocket to Common.
Commit migrated from https://github.com/dotnet/corefx/commit/2a2a85cda20300df8bfd31d442d6f3b37028d310
2017-01-17 15:33:03 -08:00
Lakshmi Priya Sekar 7eed6cc2e5 Add websocket connections on Unix HttpListener.
Commit migrated from https://github.com/dotnet/corefx/commit/56d01b0e047f06d2f2a785f931fa9556b4a73a09
2017-01-17 15:33:03 -08:00
Karthik Rajasekaran 4bbdadd88a Update project configuration and sln files (dotnet/corefx#15182)
* Add ValidateVSConfigurations

* Update project config and sln files.


Commit migrated from https://github.com/dotnet/corefx/commit/f6ab339f446e37505f93ef9f430801fa1dcc05b8
2017-01-17 14:31:23 -08:00
Jose Perez Rodriguez 24a5aef91d Merge master into dev/eng
Commit migrated from https://github.com/dotnet/corefx/commit/a9dd06b73bdd71038217bb263decf2b7285fb8db
2017-01-12 10:09:09 -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
Alex Perovich c3087a2ed5 Manual changes for ns2.0 rename
Commit migrated from https://github.com/dotnet/corefx/commit/7bba15c1d2518d3f0bb85c40ed87322edfdf87eb
2017-01-10 16:20:29 -08:00
Jose Perez Rodriguez c65aa91391 [dev/eng] Sorting and trimming Reference items in csprojs (dotnet/corefx#15035)
Sorting and trimming Reference items in csprojs


Commit migrated from https://github.com/dotnet/corefx/commit/d1a6358e7a6b1bc04223885c860701209d52a7e8
2017-01-10 13:24:35 -08:00
Jose Perez Rodriguez f2afbc3fa7 Build working on non-Windows after merging master
Commit migrated from https://github.com/dotnet/corefx/commit/609eedb2925a2401d8f80b637e12b1490ab973ef
2017-01-09 09:40:22 -08:00
Justin Van Patten 82a73c575a Append directly to the request headers StringBuilder
Avoid intermediate allocations associated with string.Format and
string.Join when building up the request headers buffer by appending
directly to the StringBuilder in WinHttpWebSocket.


Commit migrated from https://github.com/dotnet/corefx/commit/c1ee50f7f03833e782e0d7f30f8d89ffe4e709fa
2017-01-06 13:15:29 -08:00
Jose Perez Rodriguez 846d8ab24b Merge branch master into dev/eng
Commit migrated from https://github.com/dotnet/corefx/commit/44b68e694948065c1b61457cec125d3d64c1fa22
2017-01-05 14:03:56 -08:00
Eric Mellino dd3d24027d Add Configurations.props files for test projects, include tests in build.proj (dotnet/corefx#14663)
* [WIP]Created src\tests.proj which is mostly building all tests

* Convert test project .builds to Configuration.props

* Fix test paths in targetingpack.props, move test-runtime.

* Move test-runtime under external.
* Rename RuntimeDir->RuntimePath in targetingpacks.props and
  Xunit.Runtime.depproj.
* Remove test-runtime project.json from the SupplementalTestData list in
  dir.targets.

* Remove XUnit.Runtime.depproj from tests.proj

* Convert test .builds files to Configuration.props.

* Revert "Convert test project .builds to Configuration.props"

This reverts commit dotnet/corefx@1efc4d9a02.

* Fix compilation error in System.Collections.Concurrent.Tests

* Fix condition in System.Collections ref project

* Fix two more Collections test project issues

* Add Configuration.props for System.Collections ref

* Fix TargetGroup conditions in System.Collections.Tests.csproj.

* Fix compilation problems with NameResoltion.Pal.Tests.

* Fix compilation errors in SqlClient Stress tests

* Fix IO.Compression.Performance tests compilation

* Fix compilation and configurations of System.Net.Http.Unit.Tests.csproj.

* Fix compilation issues in System.Private.Xml.Linq tests

* Disable XsltScenarios.Tests project, like it was before.

* Fix missing DefineConstants for System.Linq ref project.

* Fix compilation of System.Net.Primitives.Pal.Tests.csproj

* Fix compilation of System.Net.Primitives.UnitTests.Tests.csproj

* Fix compilation of System.Security.Cryptography.Cng.Tests.csproj.

* Fix compilation of System.Net.Primitives reference project

* Fix compilation of System.Net.Security ref project

* Fix compilation of SYstem.Net.Security.Tests.csproj

* Fix configuration of X509Certificates ref project

* Fix compilation errors in System.Net.Http.Unit.Tests.csproj

* Fix Common.Tests.csproj

* Fix System.Diagnostics.Debug.Tests.csproj

* Fix Microsoft.Win32.Registry.Tests.csproj

* Add runtime.native.System.Data.SqlClient.sni to external project

* Fix System.Diagnostics.TraceSource.Tests.csproj

* Fix System.IO.Compression.Performance.Tests.csproj

* Move supplemental test data into test-runtime/project.json

* Fix System.IO.FileSystem.Watcher.Tests.csproj

* Fix System.IO.FileSystem.Tests.csproj

* Fix System.IO.Pipes.AccessControl.Tests.csproj

* Fix System.IO.MemoryMappedFiles.Tests.csproj

* Fix System.IO.Pipes.Tests.csproj

* Fix System.Json.Tests.csproj

* Add missing supplemental test data for net security tests

* Fix resource names in System.Xml.XPath.XDocument.Tests.csproj

* Fix Assembly.Location test case

* Fix assembly loading paths in DefaultLoadContextTest.cs

* Fix issues in System.Runtime.Loader.Tests.csproj

* Fix RootNamespace in ResourceManager tests

* Mark OpenSSL tests as unsupported on Windows

* Fix RootNamespace in System.Xml.XPath.Tests.csproj

* Fix RootNamespace in System.Xml.XPath.XmlDocument.Tests.csproj

* Fix System.IO.Compression.Tests.csproj

* Add missing Configurations.props files for System.Net projects

* Fix compilation issues in WinHttpHandler tests

* Add fixes and a workaround for Linq.Expressions tests

* Add workaround for System.Runtime.Tests

* Use extension methods explicitly in Ref.Emit tests

* Hook up test projects into build

* Fix build configuration of Crypto.Primitives for netcoreapp

* Enable VB tests outside Windows

* Enable Mail tests outside windows

* Don't run Unsafe tests outside windows

* Don't build Unsafe tests outside Windows

* Don't build WebServer project outside of Windows.

* Fix corerun path for Unix tests.

* Fix casing of 'Native' directory in NETCoreApp private pkgproj

* Remove runtime-specific stuff from Xunit.Runtime.depproj

* Move tests into a separate project ('tests.msbuild') which isn't built in build.proj

* Remove duplicate types from NameResolution.Pal tests

* Skip tests in a project if there is no compatible configuration.

* Include internal socket types only on Windows in NameResolution tests

* Manually fix S.R.InteropServices configurations

* Rename tests.msbuild -> tests.builds

* Manually fix System.Text.Encoding.Tests.csproj configuration

* Manually fix System.Threading.Tests configuration

* Manually clean up System.Runtime.Tests.csproj

* Fix System.IO.FileSystem.Tests configurations

* Manually fix System.Globalization.Tests configurations

* Manually fix System.IO.Pipes.Tests configurations

* Manually fix System.IO.Compression.Tests configurations

* Manually fix System.Runtime.Extensions.Tests configurations

* Manually fix System.IO.MemoryMappedFiles.Tests configurations

* Manually fix S.Diagnostics.Process.Tests configurations

* Manually fix System.ComponentModel.TypeConverter.Tests configurations

* Misc PR feedback.

* Use HostRunnerName instead of HostRunner in Process tests

* Fix configurations for S.ServiceProcess.ServiceController.Tests

* Revert to using ConfigurationErrorMsg to check if tests should be skipped.

Configuration still defaults to 'Debug' even if there is no valid configuration.


Commit migrated from https://github.com/dotnet/corefx/commit/2c0352ec38f9f6f602ae819f0cafb02c1908f137
2017-01-03 13:27:19 -08:00
chcosta 8670eb1802 Use static configurations for building a vertical (dotnet/corefx#14489)
* Build each configuration of corefx tools

* Fully qualify path to props files for import

* Build using static configurations

* Package build, ignore references to System.Threading.Overlapped and
System.Runtime.Serialization.Formatters which aren't being built at the
moment.

* Rename target

* Remove unintentional add of baseline file

* Configuration fixes, fix typo in netci.groovy, re-enable specifying
OSGroup property

* Interim build, overbuilds reference assemblies

* Reduce to passing Configurations

* Fix traversal, undefine configuration for contract projects, remove
trimunconverted (not used)

* lower message importance

* Minor fixes, changing messages, fixing comment

* system.runtime.extensions contract causes binclash because it requires a
configuration.  temporarily disable configuration

* Fix trimming of projects

* Eliminate circular dependency in package build

* Fix OSX build

* Cleanup, less msbuild invocations


Commit migrated from https://github.com/dotnet/corefx/commit/3398321b7a54c5d47e4530651d3bee43794c1320
2016-12-16 13:05:30 -08:00
Jose Perez Rodriguez e5529a906d Make Test projects compile against the Targeting pack. (3/3 of the work) (dotnet/corefx#14534)
Commit migrated from https://github.com/dotnet/corefx/commit/c06e46913f93aa4d4eec880410c3edb4e5039639
2016-12-15 13:12:46 -08:00
Cristian Pop e21c7d4f73 Adding tracking issue for ManagedWebSocket missing features.
Commit migrated from https://github.com/dotnet/corefx/commit/fee65f7316dfcf9f9f0767d2031e418fc1ef0b28
2016-12-13 12:23:26 -08:00
chcosta bc03ea6283 Remove builds files (dotnet/corefx#14449)
Commit migrated from https://github.com/dotnet/corefx/commit/bc4d19a5e65708208d1aae6ddb2e02f12b85a919
2016-12-12 13:25:22 -08:00
chcosta 978dd4aeed vertical build port to Dev/eng [Do not merge] (dotnet/corefx#14171)
* Vertical build changes

* Build a vertical in dev/eng

* remove repro.bat from check-in

* Remove defaulttargetgroup from configurations.props files

* Remove configurations.props from test libraries

* Additional configuration files, updating traversal.

* Add default configurations for ref projects

* Remove default targetgroups, disable code analysis (currently breaking the
vertical build).

* Build vertical using Eric's changes to configurations

* Minor fixes to build from a clean enlitment

* Set targets properties in dir.props

* Make vertical build the default

* Include building src\tools in init-tools.cmd

* Add linux init-tools

* Fix msbuild.sh command

* Add build tools message to Linux

* Revert init-tools, investigate building corefx tools tomorrow

* Update configurations, remove empty targetgroup from all projects, modify
most conditionals to be positive conditions instead of negative

* Remove unneccessary generateprojectconfigurations project

* Build CoreFx.tools in init-tools

* Can't build corefx.tools in init-tools because packages aren't restored

* Hack build to build refs first

* Slightly less hacky reference project build, but still kind of hacky...

* Align properties for ref builds to prevent binclash and overbuilding

* Update BeforeTarget for rename

* Rework traversal to work with ref and corefx tools projects

* Add target for builds projects

* Fully qualify paths to projects

* Fully quality path name for corefx.tools

* testing removing osgroup from groovy on Windows

* Remove OSGroup from config.json

* revert change to groovy

* return os property

* Try changing osgroup to hostos

* hack around osgroup setting

* Fix passing groups

* Add system.collections which was missing from system.console

* Add some missing references for Unix build

* Add references for unix

* Unix support changes

* Fix typo in system.net.http

* Fix typo in system.threading.overlapped

* no ref project available for system.reflection.metadata

* Unix changes

* Exclude system.memory

* diagnostics.fileversioninfo was missing reference to Path

* Unix changes

* Fix reference name

* Add reference for unix

* Move source file to windows only

* Disable building system.threading.overlapped


Commit migrated from https://github.com/dotnet/corefx/commit/a07f6aac5309b30154d0fe00debe7f9979600ea1
2016-12-10 11:29:31 -08:00
Stephen Toub 27e985cfa3 Replace "readonly static" with "static readonly"
There are ~4000 occurrences in corefx of "static readonly".  There are ~200 occurrences of corefx of "readonly static".  Replacing all of the straggler "readonly static" cases with "static readonly" to make things consistent.


Commit migrated from https://github.com/dotnet/corefx/commit/d9d1e815ad6c642cf5d61afa4a16726548598bb2
2016-12-09 10:27:00 -05:00
Stephen Toub be092c747d Use ArrayPool in ManagedWebSocket
This switches from allocating byte arrays to getting them from ArrayPool.  There are two primary buffers, and then a few smaller ones.  The receive buffer is rented for the lifetime of the websocket, whereas the send buffer is rented only for the duration of a send.  By switching to using ArrayPool, memory consumption when many websockets are being used should be less, as they will only take up the space for the send buffer while it's in use.


Commit migrated from https://github.com/dotnet/corefx/commit/9b2343e4fbbcf1a97adaa4971015f75324b390d7
2016-12-08 17:54:13 -05:00
Jose Perez Rodriguez 11e7a62b8b Delete project.jsons
Commit migrated from https://github.com/dotnet/corefx/commit/09e45e8d1cc901184accb168fe082a260a0de6e6
2016-12-06 13:16:43 -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
Eric St. John 34d56a4c14 Update stable dependencies to latest stable
This reduces total download of packages.


Commit migrated from https://github.com/dotnet/corefx/commit/d6fa06e13d29ce9931c395c729d5e61441c02ee8
2016-11-22 11:03:12 -08:00
John Chen (CLR) 6f8034b562 Merge latest from 'master' and resolved conflicts
Commit migrated from https://github.com/dotnet/corefx/commit/b9b53c8efa4b259312f8997c86dcfb11083f88ab
2016-11-15 09:11:17 -08:00
Lakshmi Priya Sekar c45e4e0a91 Address nits and other changes from PR feedback.
Commit migrated from https://github.com/dotnet/corefx/commit/3f1f8b3cc80efe72a88b8be8780bbbbc4a7b7311
2016-11-14 16:44:39 -08:00
Eric Mellino 1435610de7 Enable ApiCompat in S.R.WinRT by updating WinRT targeting pack
Commit migrated from https://github.com/dotnet/corefx/commit/0af44e88bd4a6ce633a542189f0536f1e6e215b0
2016-11-14 12:31:25 -08:00
John Chen (CLR) e6544e45f9 Reorganize DLL imports
Removed obsolete constants from Interop.Libraries.cs, and moved
files under src/Common/src/Interop/Windows to proper locations.


Commit migrated from https://github.com/dotnet/corefx/commit/aff71a53a57a39cbcaa7110c7dc1124f0700c13d
2016-11-10 16:04:46 -08:00
Stephen A. Imhoff 32e553768a System.Net.WebSockets.Client - remove race condition from ReceiveAsync cancellation test. (dotnet/corefx#12487)
Commit migrated from https://github.com/dotnet/corefx/commit/976bfd150ceab1eba0bcb4efad41cc269b8be14e
2016-10-31 13:18:10 -04:00
Stephen Toub 7b2a531875 Add additional System.Net tracing tests
- Add tests that actually exercise the event sources, making sure that no event source errors are produced and that events are actually generated.
- Fix a few src issues found from these tests.


Commit migrated from https://github.com/dotnet/corefx/commit/2284f735df7ad8c072b7861980d205c4476709b8
2016-10-29 11:53:54 -04:00
Stephen Toub 9c38e533c4 Address PR feedback
- Fix a few copy-and-paste errors
- Rename DumpArray to DumpBuffer
- Prefix every NetEventSource usage with IsEnabled check (except for Fail, which represents a critical programming error)


Commit migrated from https://github.com/dotnet/corefx/commit/3b251eb0632d1a1b70bdeb928c86d45b2bb2b897
2016-10-29 10:01:53 -04:00
Stephen Toub 78652d624e Overhaul System.Net library logging
This PR overhauls how logging is accomplished in the System.Net libraries.

There are a few problems with the existing solution:
1. In the original sources, logging was split across a GlobalLog class and a Logging class.  Global-related tracing went to GlobalLog, and library-specific tracing went to Logging.  When the sources were moved to corefx, this evolved into multiple EventSource-based types, most of which were in Common and were then src-included into each System.Net assembly.  This has a significant problem, though, which is that the name/Guid identity of an EventSource can only exist once in a process, and subsequent EventSource instances with the same identity fail.  This means that whichever assembly ends up logging something first wins, and all other tracing from other System.Net assemblies ends up being lost.
2. The split also may have made sense when all components shared the same GlobalLog, but now that GlobalLog is included as a unique EventSource instance in each assembly, it's no longer global.  This means that we're not only loading multiple EventSources unnecessarily (each has its own costs), but we're also duplicating logging, as some logging is done to one or the other, but some logging is done to both.
3. Due to sharing the Logging class, which evolved into an EventSource-based type, many logging calls had to include which component they came from as an enum value, leading to bloating at the call sites.
4. Additionally, many logging operations included the name of the method in which the calling was being done, which meant both longer call sites as well as stale values as members got renamed over time.
5. Call sites ended up getting fairly long due to lots of string concatenation operations and other manipulations in the logging call.  This also then led to most call sites needing to be guarded behind checks for IsEnabled, leading to lots of code at every call site and obscuring the actual information being traced.
6. An additional requirement that got added with the move to corefx was that certain failure conditions should both Debug.Fail and do tracing, leading to some tracing operations taking upwards of 10 lines of code.

All of these issues are addressed by this PR.

- Each System.Net assembly that needs to log now loads a single NetEventSource type for doing logging, each with its own identity.
- That implementation is split across a common, partial NetEventSource.Common.cs file used by all such assemblies, and then a per-assembly partial NetEventSource.AssemblyName.cs file used by the individual assembly.  The former file contains most of the logging implementation.  The latter files typically contain just the partial class declaration along with the [EventSource] attribute that gives that assembly's NetEventSource its unique identity / name.
- The logging operations in NetEventSource.Common.cs use a variety of relatively-recent language enhancements to improve the logging.  Each operation uses a [CallerMemberName] so that the call sites don't need to specify the caller.  FormattableString is used so that call sites can use string interpolation while still providing the logging implementation the flexibility to format the individual components in a desired fashion (e.g. IntPtrs are formatted as hex, SafeHandles are rendered in a way that includes their name+hashcode+handle, etc.), along with a mechanism that allows individual libraries to add additional formatting rules.  Each operation allows the this reference (or another this-like context object) to be passed in, to simply identify the source of the call (in concert with the caller member name).  A debug-only mechanism is included in the tracing to help find potential perf issues due to misuse of the logger.  Etc.
- A Fail logging operation is included that both traces and does a Debug.Fail.

With these changes, most call sites are greatly simplified.  Some examples:
Before:
```C#
if (GlobalLog.IsEnabled)
{
    GlobalLog.AssertFormat("ContextAwareResult#{0}::ContextCopy|Called on completed result.", LoggingHash.HashString(this));
}
Debug.Fail("ContextAwareResult#" + LoggingHash.HashString(this) + "::ContextCopy |Called on completed result.");
```
After:
```C#
NetEventSource.Fail(this, "Called on completed result.");
```

Before:
```C#
if (NetEventSource.Log.IsEnabled()) NetEventSource.Enter(NetEventSource.ComponentType.Http, this, ".ctor", handler);
```
After:
```C#
NetEventSource.Enter(this, handler);
```

Etc.

In addition to fixing up all of the event sources, I of course also fixed up all usage in order to clean up the call sites.  However, this was a rather mechanical change: I did not remove existing logging (other than duplication) nor did I add new logging.  At some point, we should review the actual logging being done to determine what's missing and what's not needed.  I also did not revise the additional existing events on the sockets and security event sources, but we may want to remove those (or some of those) in favor of just using the shared events.


Commit migrated from https://github.com/dotnet/corefx/commit/92fd5c0814bcc0c03acfa9f3ad857661828b35a6
2016-10-29 10:01:53 -04:00
Alex Perovich 3d36dbec18 Add SuppressMessage attributes for valid uses of SHA-1 and MD5 (dotnet/corefx#13014)
Commit migrated from https://github.com/dotnet/corefx/commit/fa04ddbaa3a6e8d899c6d77c6646a16986e2657c
2016-10-25 16:15:11 -07:00
Eric St. John 7be27b9754 Fix fix breaks from latest stable pkgs, no-imports
Latest stable packages hide implementation dependencies so some projects
need to add refs to packages they require.

Some projects were incorrectly referencing (and not using) packages
which were incompatible with the TFM they targeted.


Commit migrated from https://github.com/dotnet/corefx/commit/3d5f62716c7936d108ce21bdb9cb47087e2dd1bb
2016-10-21 06:32:54 -07:00
Eric St. John 4a6c9bbb81 Update all projects to last stable packages
And remove imports.

Now that we have netstandard packages that support all targets we should
use them.  This means we don't need imports.

I opted to use the stable packages rather than the LKG ones since this
will reduce churn in the product assemblies.

This has the added benefit of reducing download time for the repo.


Commit migrated from https://github.com/dotnet/corefx/commit/a330f3651c999b241d55ca25d9baa7fb0f247c5c
2016-10-21 06:32:53 -07:00
Karthik Rajasekaran 9255a2e649 Combine test dependencies into a common project.json.
Restore this common project.json upfront to improve sync time and avoid download contention from nuget.


Commit migrated from https://github.com/dotnet/corefx/commit/654f5548f946659c694d110a4bbce8aa33f1a7a1
2016-10-18 11:39:53 -07:00
dotnet-bot 94f229c6a7 Update CoreClr, CoreFx to beta-24617-03, beta-24617-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/4c6df2edbad3b5d8ec3914c0366f80ebb73f7c12
2016-10-18 08:43:24 -04:00
dotnet-bot 7b31a1e04a Update CoreClr, CoreFx, External to beta-24615-02, beta-24615-03, beta-24614-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/025cec5bf1e82980a77e473f2e5d599ffd60af49
2016-10-15 08:33:01 +00:00
Stephen Toub 52e3c3d7ae Change all refs to use "throw null;" as member bodies
Following our new guidelines for ref assembly implementations and what GenApi now creates, this updates all of our ref .cs files to use "throw null;" for member bodies that can't just be empty (i.e. members that need to return a value either via the return type or via an out parameter).  I made the change programatically using a simple Roslyn-based tool.


Commit migrated from https://github.com/dotnet/corefx/commit/a9fdc79ff8feb5ad46e9fcbe18fdffcd0bd74679
2016-10-13 09:43:23 -04:00
dotnet-bot 511149ab83 Update CoreClr, CoreFx, External to beta-24613-02, beta-24613-01, beta-24613-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/8f355c66ac9adbf9f36cfdd019ba1d2cefb54001
2016-10-13 08:37:30 +00:00
dotnet-bot 4a517b60c6 Update CoreClr, CoreFx to beta-24612-03, beta-24612-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/f01cf91423391f80ad5269340eb8e602ea9cb087
2016-10-12 16:28:54 +00:00