C# Class StratosCompanionWebApi.Workbench.CompanionFiles.Extensions

Mostra file Open project: SilversphereInc/RedisRipper

Public Methods

Method Description
AddCRC16 ( this data, int offset, int length ) : void

Computes the CRC-16 value of a list of bytes and appends the resulting two bytes to the end of the list.

ComputeCRC16 ( List data, int offset, int length ) : UInt16

Computes the CRC-16 value of a list of bytes.

MaximumLength ( this str, int maxLength ) : string
StringToPaddedList ( this value, int maximumLength ) : List

Converts a string to a UTF-8 encoded list of bytes. Will pad the right side of the string with spaces to fill out the maximum length if necessary.

Method Details

AddCRC16() public static method

Computes the CRC-16 value of a list of bytes and appends the resulting two bytes to the end of the list.
public static AddCRC16 ( this data, int offset, int length ) : void
data this
offset int
length int
return void

ComputeCRC16() public static method

Computes the CRC-16 value of a list of bytes.
public static ComputeCRC16 ( List data, int offset, int length ) : UInt16
data List
offset int
length int
return System.UInt16

MaximumLength() public static method

public static MaximumLength ( this str, int maxLength ) : string
str this
maxLength int
return string

StringToPaddedList() public static method

Converts a string to a UTF-8 encoded list of bytes. Will pad the right side of the string with spaces to fill out the maximum length if necessary.
public static StringToPaddedList ( this value, int maximumLength ) : List
value this
maximumLength int
return List