src/UWP.Samples.AsyncResponseFromSerialDevice/ResponsePackage.cs
/// <summary>
/// Parses bytes of the package.
/// </summary>
Parses bytes of the package.
Parses bytes of the package .
public void ParseBytes(byte[] bytes)
        {
            this.Id = BitConverter.ToInt32(bytes.Skip(1).Take(4).ToArray(), 0);
            this.Data = bytes.Skip(5).Take(bytes.Count() - 6).ToArray();
        }
public void ParseBytes ( byte [ ] bytes ) { this . Id = BitConverter . ToInt32 ( bytes . Skip ( 1 ) . Take ( 4 ) . ToArray ( ) , 0 ) ; this . Data = bytes . Skip ( 5 ) . Take ( bytes . Count ( ) - 6 ) . ToArray ( ) ; }
Parses bytes of the package.
Parses bytes of the package .
// For example, packages have a following format: // [0xfe][PackageId][Data][0xff]
bytes
byte[]