Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,9 @@ private async IAsyncEnumerable<T> CastIAsyncEnumerable<T>(string methodName, obj
for (var i = 0; i < args.Length; i++)
{
var arg = args[i];
if (arg is not null && ReflectionHelper.IsStreamingType(arg.GetType()))
// Primitives, strings, enums, DateTime and decimal can never be streams, skip the reflection check
// for them since it allocates (Type.GetInterfaces) for every argument on every send.
if (arg is not null && Type.GetTypeCode(arg.GetType()) == TypeCode.Object && ReflectionHelper.IsStreamingType(arg.GetType()))
{
isStreaming[i] = true;
newArgsCount--;
Expand Down
Loading