Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Merge nmirror to master - #1590

Merged
jkotas merged 6 commits into
masterfrom
nmirror
Jul 28, 2016
Merged

jkotas merged 6 commits into
masterfrom
nmirror

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

No description provided.

Atsushi Kanamori and others added 2 commits July 28, 2016 04:48
Take advantage of C# 6.0 and bring things closer
to our OSS coding guidelines:

- Run a CodeFormatter pass.

- Remove the "global::" qualifiers on the usings
  (a relic from days where we nested them inside the
  namespace blocks)

- Add "readonly" to fields where possible.

- Make properties read-only whenever possible.

- Use nameof() rather than string literal for exceptions.

- Do a pass for unsealed internal types or unsealed
  overridden members (unless accompanied by a comment
  explaining exactly what I expect to override.)
Format/style pass over System.Private.Reflection.Core.
dotnet-bot and others added 4 commits July 28, 2016 10:31
…Lib.

This change is motivated by the Reflection API work. A number of reflection type need to be migrated to System.Private.CoreLib, including Assembly. Assembly has a dependency on Stream, so it will need to be moved as well. Stream, in turn, has a dependency on Task, and Task ends up requiring most of what is currently in System.Private.Threading.

As such, this change pulls almost all of the types in System.Private.Threading into System.Private.CoreLib. Future changes will move Stream and Assembly.

A few things to note about this change:

1.) System.Private.Threading depended on the Random type, which is found in CoreFX. I've simply copied the implementation of Random from the CoreFX repo. We'll need to decide if we want to retire that copy in favor of this one, or simply live with two copies.

2.) Type forwards have been put in place for all public types involved in the move for the sake of those assemblies that depend on System.Private.Threading directly instead of the System.Threading or System.Threading.Tasks contracts.

3.) To avoid pulling all of the ETW tracing from CoreFX into System.Private.CoreLib, I've defined a set of callbacks for ETW events in System.Private.CoreLib. The callbacks are implemented in System.Private.Threading, along with the existing EventSource implementations. The callbacks are hooked up using the EagerOrderedStaticConstructor attribute, and ILC has been updated to force the hookup code to be kept alive.

4.) A handful of public types are left in System.Private.Threading. Since they don't have to be moved and we need to keep System.Private.Threading around for the EventSources anyway, I'm planning on leaving them where they are.

5.) I've deleted a couple of internal types that weren't being used, as well as some string resources. These were dead code even before this migration.

These changes have passed precheckin.bat on x86 ret.

[tfs-changeset: 1619702]
[tfs-changeset: 1619706]
@jkotas
jkotas merged commit cd30e44 into master Jul 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants