public static IList <T> StringToList <T>(object source, char separator = ',') { IList <T> list = (IList <T>) new List <T>(); string str1 = TypesHelper.ObjectToString(source, "", false, (string)null); char[] chArray = new char[1] { separator }; foreach (string str2 in str1.Split(chArray)) { try { list.Add((T)Convert.ChangeType((object)str2, typeof(T), (IFormatProvider)CultureInfo.InvariantCulture)); } catch { } } return(list); }
public static bool e_IsNullValue(this object source) { return(TypesHelper.ObjectIsNullOrWhiteSpace(source)); }
public static bool e_IsNull(this object source) { return(TypesHelper.ObjectIsNull(source)); }
public static IList <T> e_StringToList <T>(this object source, T defValue, char separator = ',') { return(TypesHelper.StringToList <T>(source, defValue, separator)); }
public static string eString(this object source, string defValue = "", bool IsRidNullstring = false, string IFvalueToDefault = null) { return(TypesHelper.ObjectToString(source, defValue, IsRidNullstring, IFvalueToDefault)); }
public static DateTime eDateTime(this object source, DateTime defValue) { return(TypesHelper.ObjectToDateTime(source, defValue)); }
public static bool eDateTime(this object source, ref DateTime Result) { return(TypesHelper.ObjectToDateTime(source, ref Result)); }
public static float eFloat(this object source, float defValue = 0.0f) { return(TypesHelper.ObjectToFloat(source, defValue)); }
public static int eInt(this object source, int defValue = 0) { return(TypesHelper.ObjectToInt(source, defValue)); }
public static long eLong(this object source, long defValue = 0L) { return(TypesHelper.ObjectToInt64(source, defValue)); }
public static Decimal eDecimal(this object source, Decimal defValue = 0M) { return(TypesHelper.ObjectTodecimal(source, defValue)); }
public static bool eBool(this object source, bool defValue = false) { return(TypesHelper.ObjectToBool(source, defValue)); }
public static bool ObjectIsNullOrWhiteSpace(object source) { return(TypesHelper.ObjectIsNull(source) || string.IsNullOrWhiteSpace(source.ToString())); }