Class DataSetExtension
Namespace: Tool.Utils.Data
Assembly: Tool.Net.dll
对DataSet进行升级
public static class DataSetExtensionInheritance
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
代码由逆血提供支持
Methods
IsEmpty(DataSet)
判断对象中的是否为空,行为空,对象为空(验证每张表,只要其中包含一张表有值,都成立。)
public static bool IsEmpty(this DataSet data)Parameters
data DataSet
Returns
返回类型
SetToJson(DataSet)
序列化AjaxJson(DataSet)
public static string[] SetToJson(this DataSet data)Parameters
data DataSet
DataSet
Returns
string[]
返回JSON字符串
SetToJson(DataSet, bool)
序列化AjaxJson(DataSet)
public static string[] SetToJson(this DataSet data, bool IsDate)Parameters
data DataSet
DataSet
IsDate bool
ToJson格式时间,启用转字符串
Returns
string[]
返回JSON字符串
SetToJson(DataSet, bool, string)
序列化AjaxJson(DataSet)
public static string[] SetToJson(this DataSet data, bool IsDate, string ToDateString)Parameters
data DataSet
DataSet
IsDate bool
ToJson格式时间,启用转字符串
ToDateString string
Date.ToString()的写法。
Returns
string[]
返回JSON字符串
ToDictionary(DataSet)
(DataTable)转换 集合
public static List<List<Dictionary<string, object>>> ToDictionary(this DataSet data)Parameters
data DataSet
DataSet
Returns
List<List<Dictionary<string, object>>>
返回Dictionary