This commit is contained in:
ahmed committed 2024-12-07 02:56:49 +03:00
1 parent ebc80b08cf
commit 07561062ca
5 files changed
+37 -37

No files matched your search

+1 -5
View File
@@ -91,17 +91,13 @@ public class FunctionTemplate : MemberTemplate
else if (genericRtType == typeof(IEnumerable<>) || genericRtType == typeof(IAsyncEnumerable<>))
{
// get export
rtType = RepresentationType.FromType(mi.GetCustomAttribute<ExportAttribute>()?.ReturnType ?? typeof(object));
rtType = RepresentationType.FromType(mi.ReturnType.GetGenericArguments()[0]);
}
else
{
rtType = RepresentationType.FromType(mi.ReturnType);
}
//var rtType = genericRtType == typeof(AsyncReply<>) ?
// RepresentationType.FromType(mi.ReturnType.GetGenericArguments()[0]) :
// RepresentationType.FromType(mi.ReturnType);
if (rtType == null)
throw new Exception($"Unsupported type `{mi.ReturnType}` in method `{type.Name}.{mi.Name}` return");