diff options
author | Evan Behar <behare@gmail.com> | 2018-07-07 23:46:28 -0700 |
---|---|---|
committer | Evan Behar <behare@gmail.com> | 2018-07-07 23:46:28 -0700 |
commit | a30794894bd9bd3e152c882286f0f3600ea41400 (patch) | |
tree | 49d519eb4699dbe78ffb9ab4e1a120bacf2fe02f /src | |
parent | 88f754e5b134f43ed6c7a833834aaeb92e44a62e (diff) | |
download | SMAPI-a30794894bd9bd3e152c882286f0f3600ea41400.tar.gz SMAPI-a30794894bd9bd3e152c882286f0f3600ea41400.tar.bz2 SMAPI-a30794894bd9bd3e152c882286f0f3600ea41400.zip |
Revert ShouldValidate
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs b/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs index 79db6921..88ba36ee 100644 --- a/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs +++ b/src/SMAPI/Framework/ModLoading/Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs @@ -111,18 +111,7 @@ namespace StardewModdingAPI.Framework.ModLoading.Finders /// <param name="type">The type reference.</param> private bool ShouldValidate(TypeReference type) { - if (type != null) - return true; - - // Extract scope name from type string representation for compatibility - // Under Linux, type.Scope.Name sometimes reports incorrectly - string scopeName = type.ToString(); - if (scopeName[0] != '$') - return false; - - scopeName = scopeName.Substring(0, scopeName.IndexOf(".", System.StringComparison.CurrentCulture)); - - return this.ValidateReferencesToAssemblies.Contains(scopeName); + return type != null && this.ValidateReferencesToAssemblies.Contains(type.Scope.Name); } /// <summary>Get a unique string representation of a type.</summary> |