You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewArgumentException($"Can not export service from static class {targetType}");
122
+
}
123
+
119
124
TargetType=targetType;
120
125
121
126
if(ExportTypeDiscovererTypeisnull)
@@ -128,7 +133,14 @@ public virtual IEnumerable<Type> GetExportServiceTypes(Type targetType)
128
133
if(typesisnull
129
134
||!types.Any())
130
135
{
131
-
thrownewModularityException($"Can not get export service for type {targetType} automatically . Must use {nameof(ExportServicesAttribute)} define it clearly .");
136
+
if(targetType.GetInterfaces().IsNullOrEmpty())
137
+
{
138
+
types=new[]{targetType};
139
+
}
140
+
else
141
+
{
142
+
thrownewModularityException($"Can not get export service for type {targetType} automatically . Must use {nameof(ExportServicesAttribute)} define it clearly .");
0 commit comments