Class TypePropertyDescriptor
Namespace: Tool.Utils.ActionDelegate
Assembly: Tool.Net.dll
引用对象属性构造器
public class TypePropertyDescriptorInheritance
object ← TypePropertyDescriptor
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)
Remarks
代码由逆血提供支持
Constructors
TypePropertyDescriptor(Type)
初始化属性构造器
public TypePropertyDescriptor(Type type)Parameters
type Type
Properties
ClassType
数据源Type
public Type ClassType { get; }Property Value
Fields
获取该对象的变量
public FieldInfo[] Fields { get; }Property Value
KeyFields
获取当前类所有变量字典
public IDictionary<string, FieldInfo> KeyFields { get; }Property Value
IDictionary<string, FieldInfo>
KeyParameters
获取当前类所有成员字典
public IDictionary<string, PropertyInfo> KeyParameters { get; }Property Value
IDictionary<string, PropertyInfo>
PropertyInfos
获取该对象的成员
public PropertyInfo[] PropertyInfos { get; }Property Value
Methods
GetField(object, string, out bool)
获取指定变量值 (支持 public/private/protected) 静态时obj为null
public object GetField(object obj, string name, out bool isexist)Parameters
obj object
对象源
name string
变量名称
isexist bool
是否可以获取
Returns
返回变量值
GetProperty(object, string, out bool)
获取指定变量值 (支持 public/private/protected) 静态时obj为null
public object GetProperty(object obj, string name, out bool isexist)Parameters
obj object
对象源
name string
变量名称
isexist bool
是否可以修改
Returns
返回变量值
SetField(object, string, object)
修改指定变量值 (支持 public/private/protected) 静态时obj为null
public bool SetField(object obj, string name, object value)Parameters
obj object
对象源
name string
变量名称
value object
修改的值
Returns
返回是否查找到并进行修改
SetProperty(object, string, object)
修改指定变量值 (支持 public/private/protected) 静态时obj为null
public bool SetProperty(object obj, string name, object value)Parameters
obj object
对象源
name string
变量名称
value object
修改的值
Returns
返回是否查找到并进行修改
TryField(string, out PropertyDescriptor)
获取指定变量
public bool TryField(string name, out PropertyDescriptor property)Parameters
name string
变量名称
property PropertyDescriptor
对象财产托管调度器
Returns
返回变量值
TryProperty(string, out PropertyDescriptor)
获取指定变量
public bool TryProperty(string name, out PropertyDescriptor property)Parameters
name string
变量名称
property PropertyDescriptor
对象财产托管调度器
Returns
返回变量值