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

Merge changes from TFS - #1547

Merged
MichalStrehovsky merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs
Jul 19, 2016
Merged

MichalStrehovsky merged 1 commit into
dotnet:nmirrorfrom
dotnet-bot:from-tfs

Conversation

@dotnet-bot

Copy link
Copy Markdown
Collaborator

No description provided.

https://github.com/dotnet/corefx/issues/9805

Preparing Reflection to make it easy to remove RuntimeType.

The actual switch is going to be a mostly automated
"mass-replace RuntimeType with RuntimeTypeInfo, add
GetTypeInfo() calls as necessary and don't think about
things too much." Based on lessons learned by a few
trial runs of this, this commit preps the codebase
ahead of time to minimize the number of things we have to
think about.

Some of the code changes may look strange (as in
adding extra conversions from Type/TypeInfo) but that's
because we're optimizing for where we're going rather
than where we are.

In particular, calls to RuntimeTypeInfo.RuntimeType
and CastToType() will become a "return this" and
will be removed entirely.

- Consolidate the Type->TypeInfo conversion helpers
  (get rid of the non-generic GetRuntimeInfo() extension
  method as it doesn't add much.)

- Remove code where we cast to or do "is/as" checks
  against RuntimeType or RuntimeTypeInfo.

- Preemptively imported the necessary namespaces
  (S.R.R.General/S.R.R.TypeInfo) on the various files
  so I don't have to do this during the big switch.

- Synced up RuntimeTypeInfo's internal surface area with
  RuntimeType's. We can remove some of these after the
  switch since they are a bit redundant.

- Added ICloneable to RuntimeTypeInfo because ummm...
  it was added to RuntimeType as part of the api syncup.

[tfs-changeset: 1618386]
@MichalStrehovsky
MichalStrehovsky merged commit 8d280af into dotnet:nmirror Jul 19, 2016
@dotnet-bot
dotnet-bot deleted the from-tfs branch July 19, 2016 17:54
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.

3 participants