public static MBusFrame FromSpan(MBusFrameType frameType, ILogger logger, Span <byte> header, Span <byte> data) { var headerByte = header.ToArray(); var dataArray = data.ToArray(); var frame = headerByte.Concat(dataArray).ToArray(); //it sucks that i need to copy the data here to get a new span - but it still works return(FromByteArray(frameType, logger, in frame)); }
public static MBusFrame FromByteArray(MBusFrameType frameType, ILogger logger, in byte[] frame)