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);
|
writer.Write(bytes);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Exception exception:
|
|
||||||
writer.Write(exception.ToString());
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new FormatException($"Unsupported argument type {argument.GetType()}");
|
throw new FormatException($"Unsupported argument type {argument.GetType()}");
|
||||||
}
|
}
|
||||||
|
|
@ -461,13 +457,6 @@ namespace Microsoft.AspNetCore.Components.Server.BlazorPack
|
||||||
{
|
{
|
||||||
return reader.ReadSingle();
|
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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue