Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 725ba2a

Browse files
KirillOsenkovmarek-safar
authored andcommitted
Fix #12461.
After .NET 4.5 .NET Framework has changed the System.ComponentModel.Composition ReflectionModelServices.IsExportFactoryImportDefinition to not throw. Updating this to match the .NET Framework behavior.
1 parent 1dee626 commit 725ba2a

File tree

1 file changed

+0
-8
lines changed
  • mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/ReflectionModel

1 file changed

+0
-8
lines changed

mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/ReflectionModel/ReflectionModelServices.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,6 @@ public static bool IsExportFactoryImportDefinition(ImportDefinition importDefini
110110
{
111111
Requires.NotNull(importDefinition, "importDefinition");
112112

113-
ReflectionImportDefinition reflectionImportDefinition = importDefinition as ReflectionImportDefinition;
114-
if (reflectionImportDefinition == null)
115-
{
116-
throw new ArgumentException(
117-
string.Format(CultureInfo.CurrentCulture, Strings.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()),
118-
"importDefinition");
119-
}
120-
121113
return (importDefinition is IPartCreatorImportDefinition);
122114
}
123115

0 commit comments

Comments
 (0)