点击或拖拽改变大小

HslReflectionHelper 类

反射的辅助类
继承层次
SystemObject
  HslCommunication.ReflectionHslReflectionHelper

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

HslReflectionHelper 类型公开以下成员。

构造函数
  名称说明
公共方法HslReflectionHelper
初始化 HslReflectionHelper 类的一个新实例
Top
方法
  名称说明
公共方法Equals (继承自 Object。)
受保护的方法Finalize (继承自 Object。)
公共方法GetHashCode (继承自 Object。)
公共方法静态成员GetHslDeviceAddressAttribute
从属性中获取对应的设备类型的地址特性信息
公共方法静态成员GetHslPropertyInfos
根据提供的类型对象,解析出符合 HslDeviceAddressAttribute 特性的地址列表
公共方法静态成员GetOperateResultJsonFromObj
公共方法静态成员GetParametersFromJson(MethodInfo, ParameterInfo)
从方法的参数列表里,提取出实际的示例参数信息,返回一个json对象,注意:该数据是示例的数据,具体参数的限制参照服务器返回的数据声明。
From the parameter list of the method, extract the actual example parameter information, and return a json object. Note: The data is the example data, and the specific parameter restrictions refer to the data declaration returned by the server.
公共方法静态成员GetParametersFromJson(ISessionContext, ParameterInfo, String)
从Json数据里解析出真实的数据信息,根据方法参数列表的类型进行反解析,然后返回实际的数据数组
Analyze the real data information from the Json data, perform de-analysis according to the type of the method parameter list, and then return the actual data array
公共方法静态成员GetParametersFromUrl
从url数据里解析出真实的数据信息,根据方法参数列表的类型进行反解析,然后返回实际的数据数组
Analyze the real data information from the url data, perform de-analysis according to the type of the method parameter list, and then return the actual data array
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法静态成员PraseStructContent(Object, Byte, Int32, IByteTransform)
根据结构体的定义,将原始字节的数据解析出来,然后赋值给对应的对象,该对象的属性需要支持特性 HslStructAttribute 才支持设置
公共方法静态成员PraseStructContentT(Byte, Int32, IByteTransform)
根据类型信息,直接从原始字节解析出类型对象,然后赋值给对应的对象,该对象的属性需要支持特性 HslStructAttribute 才支持设置
公共方法静态成员ReadT(IReadWriteNet)
从设备里读取支持Hsl特性的数据内容,该特性为HslDeviceAddressAttribute,详细参考论坛的操作说明。
公共方法静态成员ReadT(RedisClient)
从设备里读取支持Hsl特性的数据内容, 该特性为HslRedisKeyAttributeHslRedisListItemAttributeHslRedisListAttributeHslRedisHashFieldAttribute 详细参考代码示例的操作说明。
公共方法静态成员ReadAsyncT(IReadWriteNet)
从设备里读取支持Hsl特性的数据内容,该特性为HslDeviceAddressAttribute,详细参考论坛的操作说明。
公共方法静态成员ReadAsyncT(RedisClient)
从设备里读取支持Hsl特性的数据内容, 该特性为HslRedisKeyAttributeHslRedisListItemAttributeHslRedisListAttributeHslRedisHashFieldAttribute 详细参考代码示例的操作说明。
公共方法静态成员SetPropertyExpT, K
使用表达式树的方式来给一个属性赋值
公共方法静态成员SetPropertyValueFrom
根据地址列表信息,数据缓存,自动解析基础类型的数据,赋值到自定义的对象上去
公共方法ToString (继承自 Object。)
公共方法静态成员WriteT(T, IReadWriteNet)
从设备里读取支持Hsl特性的数据内容,该特性为HslDeviceAddressAttribute,详细参考论坛的操作说明。
公共方法静态成员WriteT(T, RedisClient)
从设备里写入支持Hsl特性的数据内容, 该特性为HslRedisKeyAttributeHslRedisHashFieldAttribute 需要注意的是写入并不支持HslRedisListAttributeHslRedisListItemAttribute特性,详细参考代码示例的操作说明。
公共方法静态成员WriteAsyncT(T, IReadWriteNet)
从设备里读取支持Hsl特性的数据内容,该特性为HslDeviceAddressAttribute,详细参考论坛的操作说明。
公共方法静态成员WriteAsyncT(T, RedisClient)
从设备里写入支持Hsl特性的数据内容, 该特性为HslRedisKeyAttributeHslRedisHashFieldAttribute 需要注意的是写入并不支持HslRedisListAttributeHslRedisListItemAttribute特性,详细参考代码示例的操作说明。
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
参见