From a30794894bd9bd3e152c882286f0f3600ea41400 Mon Sep 17 00:00:00 2001 From: Evan Behar Date: Sat, 7 Jul 2018 23:46:28 -0700 Subject: Revert ShouldValidate --- .../Finders/ReferenceToMemberWithUnexpectedTypeFinder.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/SMAPI/Framework/ModLoading/Finders') 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 /// The type reference. 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); } /// Get a unique string representation of a type. -- cgit