mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-05-06 03:32:57 +00:00
InvocationContext
This commit is contained in:
parent
07561062ca
commit
979a30805e
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user