1
This commit is contained in:
@@ -12,6 +12,7 @@ using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Markup;
|
||||
using BITKit.Net.Examples;
|
||||
|
||||
namespace BITKit.Net
|
||||
@@ -324,7 +325,14 @@ namespace BITKit.Net
|
||||
{
|
||||
dynamic result = methodInfo.Invoke(handle, pars)!;
|
||||
|
||||
value = await result;
|
||||
if (methodInfo.ReturnType == typeof(void) || methodInfo.ReturnType == typeof(UniTask))
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = await result;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -332,7 +340,10 @@ namespace BITKit.Net
|
||||
}
|
||||
|
||||
returnWriter.Write(true);
|
||||
BITBinary.Write(returnWriter, value);
|
||||
if (value is not null)
|
||||
{
|
||||
BITBinary.Write(returnWriter, value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user