HslStructAttribute 类 |
命名空间: HslCommunication.Reflection
HslStructAttribute 类型公开以下成员。
名称 | 说明 | |
---|---|---|
HslStructAttribute(Int32) |
指定偏移地址来实例化一个对象 Specify an offset address to instantiate an object | |
HslStructAttribute(Int32, Int32) |
指定偏移地址和长度信息来实例化一个对象 Specify offset address and length information to instantiate an object | |
HslStructAttribute(Int32, Int32, String) |
指定偏移地址,长度信息,编码信息来实例化一个对象,通常应用于字符串数据 Specify offset address, length information, and encoding information to instantiate an object, usually applied to string data | |
HslStructAttribute(Int32, Int32, String, Int32) |
指定偏移地址,长度信息,编码信息,字符串解析模式来实例化一个对象,通常应用于字符串数据 Specify offset address, length information, encoding information, string parsing mode to instantiate an object, usually applied to string data |
名称 | 说明 | |
---|---|---|
Encoding |
编码信息,如果是字符串类型,则表示字符串的编码信息,可选 ASCII UNICODE UTF8 GB2312 ANSI BIG-UNICODE Encoding information. If it is a string, it indicates the encoding information of a string. The option is ASCII UNICODE UTF8 GB2312 ANSI BIG-UNICODE | |
Index |
字节偏移字节信息,如果是bool,就是位偏移地址,按照位为单位 Byte offset Indicates the byte information. If the value is bool, it is the address of the bit offset. The unit is bits | |
Length |
长度信息,如果是普通类型,则表示数组,如果是字符串,则表示字符串占用的最大字节长度 Length information, if a common type, represents an array, if a string, represents the maximum length of bytes taken by the string | |
StringMode |
字符串的解析模式,0:默认没有字节头 1: 一个头子节,表示长度,2: 两个头子节,最大字符数和实际字符数,3: 两个字节头,实际字符数,4: 四个头字节,最大字符数和实际字符数,5: 四个头字节,字符串实际长度 Parsing mode of the string, 0: default byte header 1: one head section, indicating the length, 2: two head sections, maximum number of characters and actual number of characters, 3: two head bytes, actual number of characters, 4: four head bytes, maximum number of characters and actual number of characters, 5: four head bytes, actual length of the string | |
TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (继承自 Attribute。) |
名称 | 说明 | |
---|---|---|
Equals | Returns a value that indicates whether this instance is equal to a specified object. (继承自 Attribute。) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) | |
GetHashCode | Returns the hash code for this instance. (继承自 Attribute。) | |
GetType | Gets the Type of the current instance. (继承自 Object。) | |
IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (继承自 Attribute。) | |
Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (继承自 Attribute。) | |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) | |
ToString | Returns a string that represents the current object. (继承自 Object。) |
名称 | 说明 | |
---|---|---|
ToJsonString |
获取当前对象的JSON格式表示的字符串。 (由 HslExtension 定义。)Gets the string represented by the JSON format of the current object. |