Class ListExtension
Namespace: Tool.Utils.Data
Assembly: Tool.Net.dll
对List进行升级
public static class ListExtensionInheritance
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
EntitysToJson(IList)
将实体转换为JSON格式字符串 (再三强调,要是实体,而且是实集合必须是。)
public static string EntitysToJson(this IList list)Parameters
list IList
实体
Returns
返回JSON字符串
EntitysToJson(IList, bool)
将实体转换为JSON格式字符串 (再三强调,要是实体,而且是实集合必须是。)
public static string EntitysToJson(this IList list, bool IsDate)Parameters
list IList
实体
IsDate bool
ToJson格式时间,启用转字符串
Returns
返回JSON字符串
EntitysToJson(IList, bool, string)
将实体转换为JSON格式字符串 (再三强调,要是实体,而且是实集合必须是。)
public static string EntitysToJson(this IList list, bool IsDate, string ToDateString)Parameters
list IList
实体
IsDate bool
ToJson格式时间,启用转字符串
ToDateString string
Date.ToString()的写法。
Returns
返回JSON字符串
GetArrayIndex<T>(IList<T>, int, int)
同于获取指定部分的内容
public static List<T> GetArrayIndex<T>(this IList<T> list, int index, int count) where T : new()Parameters
list IList<T>
对象数组
index int
从下标N开始
count int
到下标N结束
Returns
List<T>
返回一部分的数组内容
Type Parameters
T
GetParamASCII<T>(List<T>)
按照ASCII码从小到大排序(未实现)(示例: 1, 2, A, B, a, b 这是格式循序)
public static List<T> GetParamASCII<T>(this List<T> list) where T : new()Parameters
list List<T>
List
Returns
List<T>
返回重新排序好的结果
Type Parameters
T
TrueForAll<T>(IList<T>, Predicate<T>)
确定是否 中的每个元素都与指定的谓词所定义的条件相匹配。
public static bool TrueForAll<T>(this IList<T> routs, Predicate<T> match) where T : new()Parameters
routs IList<T>
List数组
match Predicate<T>
条件
Returns
该方法返回,成功,或失败。
Type Parameters
T
类型