mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-04 12:47:57 +08:00
1.修正KdbndpParameter无法处理Iterator类型的bug
This commit is contained in:
parent
da406a64bb
commit
9a0d1ba378
@ -1606,7 +1606,7 @@ namespace SqlSugar
|
|||||||
if (item.Value != null)
|
if (item.Value != null)
|
||||||
{
|
{
|
||||||
var type = item.Value.GetType();
|
var type = item.Value.GetType();
|
||||||
if ((type != UtilConstants.ByteArrayType && type.IsArray&&item.IsArray==false) || type.FullName.IsCollectionsList())
|
if ((type != UtilConstants.ByteArrayType && type.IsArray&&item.IsArray==false) || type.FullName.IsCollectionsList()||type.IsIterator())
|
||||||
{
|
{
|
||||||
var newValues = new List<string>();
|
var newValues = new List<string>();
|
||||||
foreach (var inValute in item.Value as IEnumerable)
|
foreach (var inValute in item.Value as IEnumerable)
|
||||||
|
@ -153,6 +153,14 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return (thisValue + "").StartsWith("System.Collections.Generic.List")|| (thisValue + "").StartsWith("System.Collections.Generic.IEnumerable");
|
return (thisValue + "").StartsWith("System.Collections.Generic.List")|| (thisValue + "").StartsWith("System.Collections.Generic.IEnumerable");
|
||||||
}
|
}
|
||||||
|
public static bool IsIterator(this Type type)
|
||||||
|
{
|
||||||
|
if (type.BaseType.IsGenericType)
|
||||||
|
{
|
||||||
|
return type.BaseType.GetGenericTypeDefinition().FullName == "System.Linq.Enumerable+Iterator`1";
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
public static bool IsStringArray(this string thisValue)
|
public static bool IsStringArray(this string thisValue)
|
||||||
{
|
{
|
||||||
return (thisValue + "").IsMatch(@"System\.[a-z,A-Z,0-9]+?\[\]");
|
return (thisValue + "").IsMatch(@"System\.[a-z,A-Z,0-9]+?\[\]");
|
||||||
|
Loading…
Reference in New Issue
Block a user