Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Make cctor not fail if the domain contains even a single type that fa… #32

Merged
merged 2 commits into from
Jul 23, 2015

Conversation

lucasmeijer
Copy link

…iled to initialize.

also, make it faster.

{
foreach (System.Reflection.Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
foreach (Type type in assembly.GetTypes())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this could be a much less invasive change just by replacing the inner loop with a checked assembly.GetType(fullTypeNameConstructedFromTypenamespaceAndTypename)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit more invasive, but also a bit more safe, as we actually wouldn't want to accidentally pick up a [ExtensionAttribute] from a user assembly. very small risk, but I figured I'd do that while I was at it.

Tak added a commit that referenced this pull request Jul 23, 2015
Make cctor not fail if the domain contains even a single type that fa…
@Tak Tak merged commit 3469dd9 into unity-trunk Jul 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants