Commit Graph
332 Commits
Author SHA1 Message Date
dotnet-bot 60a7566d99 Update CoreClr, CoreFx, ProjectNTfs to beta-24827-03, beta-24827-01, beta-24827-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/f7f3a2ed0b236af4d7e77cbeb4c170a5b9c3f69d
2016-12-27 19:42:49 -08:00
dotnet-bot 5b05514dc1 Update CoreClr, CoreFx, ProjectNTfs to beta-24814-02, beta-24814-01, beta-24814-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/5e7220551ecf55c32227aa51a94113f82ff3e318
2016-12-14 09:32:55 +00:00
dotnet-bot 2265a63681 Update CoreClr, CoreFx, ProjectNTfs to beta-24813-01, beta-24813-02, beta-24813-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/ff7001d51c4263298b4790206edcde74f5d0ff39
2016-12-13 04:16:59 +00:00
dotnet-bot 7b26a7e899 Update CoreClr, CoreFx to beta-24811-03, beta-24811-02, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/f77687d070721a2e16d427236dba471e5641a22c
2016-12-11 17:25:16 +00:00
dotnet-bot 496e3fb9b2 Update CoreClr, CoreFx to beta-24811-01, beta-24811-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/311289fced622546cf385e5255684694f5161f3c
2016-12-11 03:39:39 +00:00
dotnet-bot 03ec1ebf0f Update CoreClr, CoreFx to beta-24810-04, beta-24810-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/9635d682c4a900e8031aea35ca6d3b66defb5009
2016-12-10 17:24:57 +00:00
dotnet-bot 4cb4a40ec4 Update CoreFx to beta-24810-02
Commit migrated from https://github.com/dotnet/corefx/commit/8f23fefaecca3650396bb10786e5b93e9cb397d9
2016-12-10 09:32:35 -05:00
dotnet-bot c28ef9e19d Update CoreFx to beta-24809-03
Commit migrated from https://github.com/dotnet/corefx/commit/4580bd85e5075c8dcca9feda219684d1ec939253
2016-12-09 21:11:25 +00: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
dotnet-bot 97d4fc14a1 Update CoreClr, CoreFx to beta-24809-02, beta-24808-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/4f6ae2b2664f6785d837f91e684b999fc888b271
2016-12-09 02:13:34 +00:00
danmosemsft 476908a0c4 Expose setters
Commit migrated from https://github.com/dotnet/corefx/commit/cc06b04b5c3b4f4dc8a96afc9d6484ee65ce2ab0
2016-12-03 12:46:34 -08:00
dotnet-bot f7a208ba73 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24721-04, beta-24721-02, beta-24721-00, beta-24721-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/bd9f87de00538052b6cf4c4faa261c0d22e04f90
2016-11-21 23:52:28 +00:00
dotnet-bot 17b9d2afa6 Update CoreFx, ProjectNTfs to beta-24717-03, beta-24718-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/dbccc58ac0186bbcf9fe0445b255b33ea583ff56
2016-11-18 04:16:59 +00:00
dotnet-bot 709886b4f3 Update CoreClr, CoreFx, ProjectNTfs to beta-24717-03, beta-24717-02, beta-24717-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/67690bd0f2bff10db494e829755fffa667184600
2016-11-17 14:43:31 -05:00
dotnet-bot f016cc9f63 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24716-02, beta-24715-03, beta-24716-00, beta-24716-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/75c2a6a9154044fe61e913db297e34a47f588994
2016-11-16 09:23:13 +00:00
Stephen Toub 482458afd0 Update CoreFx, External, ProjectNTfs to beta-24715-02, beta-24715-00, beta-24715-00, respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/9e8050a2bdca9aeff16bd8e704f380e86813821d
2016-11-15 11:43:51 -05:00
Lakshmi Priya Sekar d9008120e0 Move CaseInsensitiveAscii type to Common location.
Commit migrated from https://github.com/dotnet/corefx/commit/e8ebf515920b9f556f2a08570fb4adb39dbed9b9
2016-11-14 16:43:42 -08:00
dotnet-bot bb01d482d2 Update CoreFx, ProjectNTfs to beta-24714-01, beta-24714-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/3342536d369d922f14cc1a9c0fb91b4440a6967e
2016-11-14 15:46:09 +00:00
dotnet-bot a02764567f Update CoreFx to beta-24711-02
Commit migrated from https://github.com/dotnet/corefx/commit/3709a83afb9ffb8aa05b6c6f5561859527226595
2016-11-11 15:52:34 +00:00
dotnet-bot b9b36cbb7a Update CoreFx, External, ProjectNTfs to beta-24711-01, beta-24711-00, beta-24711-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/2ab7ba374f98bb0c3785435169d9b568c5f24eba
2016-11-11 06:19:20 +00:00
dotnet-bot d1fb8ddc0f Update CoreFx, External, ProjectNTfs to beta-24710-01, beta-24710-00, beta-24710-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/0a2361383fda2720c5eada8c80d24850a9d61246
2016-11-10 14:31:27 -08:00
Dan Moseley e6617e30b3 Revert param names (dotnet/corefx#13521)
Commit migrated from https://github.com/dotnet/corefx/commit/2c32fb1c1a14a054609a6f1a94927eb4e13bdd5e
2016-11-10 07:34:02 -05:00
dotnet-bot c5bd931c2d Update CoreFx to beta-24709-02
Commit migrated from https://github.com/dotnet/corefx/commit/68a1670fc7b9c9419f5d3100ac9a4347874aeef8
2016-11-09 15:38:49 +00:00
dotnet-bot d6f29b0517 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24709-02, beta-24709-01, beta-24709-00, beta-24709-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/8a5167a13e1ae72cff71285c49f5f84e10a64248
2016-11-09 09:19:32 +00:00
dotnet-bot c561086403 Update CoreClr, CoreFx to beta-24709-01, beta-24708-05, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/bafbeec4841285834d31bee295c225a61de2b780
2016-11-09 01:10:38 +00:00
Stephen Toub 27794c3e5c Update corefx to beta-24708-03
Commit migrated from https://github.com/dotnet/corefx/commit/9f9c2885208315215b7e328ea399f13c83d1b8a7
2016-11-08 17:10:15 -05:00
dotnet-bot b740f1d2bd Update CoreClr, CoreFx, External, ProjectNTfs to beta-24708-02, beta-24707-01, beta-24708-00, beta-24708-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/b255d0bf4df94eb383c1bb4b42b1bfe9b64f3238
2016-11-08 17:07:45 -05:00
dotnet-bot d63a7b41df Update CoreFx to beta-24705-01
Commit migrated from https://github.com/dotnet/corefx/commit/c7603507fe200426130f10d6b2cc67dfeda2c83f
2016-11-05 02:22:03 +00:00
dotnet-bot 540789c36c Update CoreClr, CoreFx, External, ProjectNTfs to beta-24704-04, beta-24704-03, beta-24704-00, beta-24704-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/d75d49704cffb9652304a357750d7f3f357be6fc
2016-11-05 00:21:20 +00:00
Tijoy Tom Kalathiparambil c1fb207fba Add missing WebHeaderCollection Keys property
Commit migrated from https://github.com/dotnet/corefx/commit/362116bf98e506f33ad81325d013076545db2c87
2016-11-03 15:39:40 -07:00
Jose Perez Rodriguez 2db115c87d Updating corefx versions to beta-24703-01
Commit migrated from https://github.com/dotnet/corefx/commit/39b5977106283eb0017dbc43af7f4d6b195753b1
2016-11-03 10:23:38 -07:00
Stephen Toub 4ee10f7b6c Update CoreFx, ProjectNTfs to beta-24701-01, beta-24701-00, respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/1b2b88d11c6b0d226481c96b1a88d20bb8cefaf9
2016-11-01 19:42:30 -04:00
Stephen Toub 66863565c9 Use nameof in more places
We previously made a pass through corefx to use nameof with argument exceptions.  Since then, a lot more code has come into the repo, and not all argument exceptions were converted at the time. We also previously missed a bunch of places where helpers were used to throw the exceptions.  This does another pass through corefx to catch most of the remaining occurrences.


Commit migrated from https://github.com/dotnet/corefx/commit/08609e84ab068d09a6e72b5906bb5282e444ae2e
2016-11-01 09:25:09 -04:00
Stephen Toub 5f0b53cb3c Update CoreFx to beta-24629-01 (master)
Commit migrated from https://github.com/dotnet/corefx/commit/63a1dbe34233c086f7fc6d28b1fefecfefc822ed
2016-10-29 22:41:56 -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 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
dotnet-bot ad2c08f972 Update CoreFx to beta-24628-03
Commit migrated from https://github.com/dotnet/corefx/commit/e634b174854638f226c81ebd5a2b6d22afca83de
2016-10-28 19:01:25 +00:00
dotnet-bot 519246eb66 Update CoreClr, CoreFx to beta-24628-03, beta-24628-02, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/56c61a5a1158ef9f1c84c87442f39015d9042491
2016-10-28 16:27:01 +00:00
dotnet-bot 5eb2424d89 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24628-02, beta-24628-01, beta-24628-00, beta-24628-01, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/56b92839e58ab41582e98eaf87452ec4b50712b4
2016-10-28 09:16:27 +00:00
Tijoy Tom Kalathiparambil 97b7dfee3d Fixes https://github.com/dotnet/corefx/issues/12139
Make WebHeaderCollection derive from NameValueCollection and
implement ISerlizable interface.Instead of copying the whole
file from FX , this change adapt the current implemention
to add the required methods.

Adding more values to WebHeaderCollectionType
Adding logging


Commit migrated from https://github.com/dotnet/corefx/commit/d92bbeeb89c037bb269bbc73d63e7cb875b85eb7
2016-10-27 19:25:59 -07:00
dotnet-bot 4ed327f131 Update CoreClr, CoreFx, External, ProjectNTfs to beta-24627-05, beta-24627-05, beta-24627-00, beta-24627-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/b030c0a58466c70ca34b56933903b31e580e6189
2016-10-27 22:28:54 +00:00
dotnet-bot a196fb6572 Update CoreFx to beta-24626-02
Commit migrated from https://github.com/dotnet/corefx/commit/ffd454cef1f7dd4a2f6969747cf45a4729e6387c
2016-10-26 14:46:03 +00:00
dotnet-bot de5dd7cba0 Update CoreClr, CoreFx, ProjectNTfs to beta-24626-01, beta-24625-02, beta-24625-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/ff859b462ada317c02c96b93918ec0e2d072459e
2016-10-26 00:20:25 +00:00
dotnet-bot b943e5d281 Update CoreClr, CoreFx, External to beta-24625-02, beta-24625-01, beta-24625-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/e1bdcc213a47f4761a6a46e8e0d612d7bc237c9a
2016-10-25 08:19:47 +00:00
Jose Perez Rodriguez 132e478c7b Updating Corefx versions to beta-24624-01
Commit migrated from https://github.com/dotnet/corefx/commit/cd40177af397e309c41f2bbcec007e21761bb688
2016-10-24 12:01:45 -07:00
Stephen Toub 344ae45288 Update CoreFx dependencies to beta-24623-01
Commit migrated from https://github.com/dotnet/corefx/commit/617811c779e36848fb1af4c2e8d8b3b1dba42e83
2016-10-23 11:50:14 -04:00
Stephen Toub 25d2794313 Add System.Net.WebHeaderCollection serialization
Commit migrated from https://github.com/dotnet/corefx/commit/b3e846da3816ea8799efa8182e11f0860b2a2411
2016-10-22 06:27:55 -04:00
Eric St. John 922ed26679 Make System.Net.WebHeaderCollection target ns1.7
Commit migrated from https://github.com/dotnet/corefx/commit/6ee8e383c853bf80fcfb05e448142bd1529af371
2016-10-20 14:28:17 -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