未验证 提交 8b1b4376 编写于 作者: R Robb Schiefer 提交者: GitHub

updating byte arrays to Span<byte> for consistency (#1541)

上级 699f2cb2
......@@ -42,7 +42,7 @@ namespace Iot.Device.Ssd13xx
/// <param name="command">The command to send to the display controller.</param>
private void SendCommand(ICommand command)
{
byte[]? commandBytes = command?.GetBytes();
Span<byte> commandBytes = command?.GetBytes();
if (commandBytes is not { Length: >0 })
{
......
......@@ -54,9 +54,9 @@ namespace Iot.Device.Ssd13xx
/// Send data to the display controller.
/// </summary>
/// <param name="data">The data to send to the display controller.</param>
public virtual void SendData(byte[] data)
public virtual void SendData(Span<byte> data)
{
if (data is null)
if (data.IsEmpty)
{
throw new ArgumentNullException(nameof(data));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册