Support fewer data types in BlazorPackHubProtocol (#11662)
These are data types not used \ required by Blazor.
This commit is contained in:
parent
6421c41d30
commit
36a651e29a
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue