Support fewer data types in BlazorPackHubProtocol (#11662)

These are data types not used \ required by Blazor.
This commit is contained in:
Pranav K 2019-07-21 16:39:45 -07:00 committed by GitHub
parent 6421c41d30
commit 36a651e29a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 11 deletions

View File

@ -428,10 +428,6 @@ namespace Microsoft.AspNetCore.Components.Server.BlazorPack
writer.Write(bytes);
break;
case Exception exception:
writer.Write(exception.ToString());
break;
default:
throw new FormatException($"Unsupported argument type {argument.GetType()}");
}
@ -461,13 +457,6 @@ namespace Microsoft.AspNetCore.Components.Server.BlazorPack
{
return reader.ReadSingle();
}
else if (type == typeof(byte[]))
{
var bytes = reader.ReadBytes();
// MessagePack ensures there are at least as many bytes in the message as declared by the byte header.
// Consequently it is safe to do ToArray on the returned SequenceReader instance.
return bytes.ToArray();
}
}
catch (Exception ex)
{