点击或拖拽改变大小

HslStructAttribute 类

继承层次
SystemObject
  SystemAttribute
    HslCommunication.ReflectionHslStructAttribute

命名空间:  HslCommunication.Reflection
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.2.0.0 (12.2.0.0)
语法
public class HslStructAttribute : Attribute

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
Top
属性
  名称说明
公共属性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。)
Top
方法
  名称说明
公共方法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。)
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见