C# 클래스 LibUsbDotNet.Main.Helper

General utilities class used by LudnLite and exposed publicly for your convience.
파일 보기 프로젝트 열기: arvydas/BlinkStickDotNet

공개 메소드들

메소드 설명
BytesToObject ( byte sourceBytes, int iStartIndex, int iLength, object destObject ) : void

Copies bytes to a blittable object.

GetEnumData ( Type type ) : int>.Dictionary

Returns a dictionary object of enumeration names and values.

HexString ( byte data, string prefix, string suffix ) : string

Builds a formatted hexidecimal string from an array of bytes.

HostEndianToLE16 ( short swapValue ) : short

Swaps low and high bytes on big endian systems. Has no effect on little endian systems.

ShowAsHex ( object standardValue ) : string

Converts standard values to decorated hex string values.

ToString ( string sep0, string names, string sep1, object values, string sep2 ) : string

Builds a delimited string of names and values.

메소드 상세

BytesToObject() 공개 정적인 메소드

Copies bytes to a blittable object.
public static BytesToObject ( byte sourceBytes, int iStartIndex, int iLength, object destObject ) : void
sourceBytes byte bytes to copy
iStartIndex int Start index
iLength int number of bytes to copy
destObject object blittable destination object
리턴 void

GetEnumData() 공개 정적인 메소드

Returns a dictionary object of enumeration names and values.
public static GetEnumData ( Type type ) : int>.Dictionary
type System.Type They of enumeration.
리턴 int>.Dictionary

HexString() 공개 정적인 메소드

Builds a formatted hexidecimal string from an array of bytes.
public static HexString ( byte data, string prefix, string suffix ) : string
data byte the byte array
prefix string string to place before each byte
suffix string string to place after each byte
리턴 string

HostEndianToLE16() 공개 정적인 메소드

Swaps low and high bytes on big endian systems. Has no effect on little endian systems.
public static HostEndianToLE16 ( short swapValue ) : short
swapValue short The value to convert.
리턴 short

ShowAsHex() 공개 정적인 메소드

Converts standard values to decorated hex string values.
public static ShowAsHex ( object standardValue ) : string
standardValue object The value to convert.
리턴 string

ToString() 공개 정적인 메소드

Builds a delimited string of names and values.
public static ToString ( string sep0, string names, string sep1, object values, string sep2 ) : string
sep0 string Inserted and the begining of the entity.
names string The list of names for the object values.
sep1 string Inserted between the name and value.
values object The values for the names.
sep2 string Inserted and the end of the entity.
리턴 string