mirror of
				https://github.com/esiur/esiur-dotnet.git
				synced 2025-10-31 16:01:34 +00:00 
			
		
		
		
	InvocationContext
This commit is contained in:
		| @@ -1528,7 +1528,8 @@ partial class DistributedConnection | |||||||
|         try |         try | ||||||
|         { |         { | ||||||
|             rt = ft.MethodInfo.Invoke(target, args); |             rt = ft.MethodInfo.Invoke(target, args); | ||||||
|             context.Ended = true; |             if (context != null) | ||||||
|  |                 context.Ended = true; | ||||||
|         } |         } | ||||||
|         catch (Exception ex) |         catch (Exception ex) | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -88,7 +88,7 @@ public class FunctionTemplate : MemberTemplate | |||||||
|         { |         { | ||||||
|             rtType = RepresentationType.FromType(mi.ReturnType.GetGenericArguments()[0]); |             rtType = RepresentationType.FromType(mi.ReturnType.GetGenericArguments()[0]); | ||||||
|         } |         } | ||||||
|         else if (genericRtType == typeof(IEnumerable<>) || genericRtType == typeof(IAsyncEnumerable<>)) |         else if (genericRtType == typeof(IEnumerable<>))// || genericRtType == typeof(IAsyncEnumerable<>)) | ||||||
|         { |         { | ||||||
|             // get export |             // get export | ||||||
|             rtType = RepresentationType.FromType(mi.ReturnType.GetGenericArguments()[0]); |             rtType = RepresentationType.FromType(mi.ReturnType.GetGenericArguments()[0]); | ||||||
| @@ -158,7 +158,8 @@ public class FunctionTemplate : MemberTemplate | |||||||
|  |  | ||||||
|         if (args.Length > 0) |         if (args.Length > 0) | ||||||
|         { |         { | ||||||
|             if (args.Last().ParameterType == typeof(DistributedConnection)) |             if (args.Last().ParameterType == typeof(DistributedConnection)  | ||||||
|  |                 || args.Last().ParameterType == typeof(InvocationContext)) | ||||||
|                 args = args.Take(args.Count() - 1).ToArray(); |                 args = args.Take(args.Count() - 1).ToArray(); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user