Skip to content

Commit

Permalink
1.2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurioli committed Jul 25, 2021
1 parent b1fb923 commit 4fc26d1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 24 deletions.
Binary file removed Applied.1.2.1.4.nupkg
Binary file not shown.
Binary file added Applied.1.2.1.5.nupkg
Binary file not shown.
31 changes: 9 additions & 22 deletions Applied/Properties.Convert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,33 +112,20 @@ private static MatchProperty GetMatchProperty(PropertyDescriptor left, PropertyD
{
Type leftType = left.PropertyType;
Type rightType = right.PropertyType;
if (leftType != rightType)
if (!leftType.IsAssignableFrom(rightType))
{
if (leftType.IsGenericType && leftType.GetGenericTypeDefinition() == typeof(Nullable<>))
if (leftType.IsValueType && leftType.IsGenericType && !leftType.IsGenericTypeDefinition
&& leftType.GetGenericTypeDefinition() == typeof(Nullable<>))
{
Type type = leftType.GetGenericArguments()[0];
if (type != rightType)
{
if (type.IsEnum)
{
return new EnumMatchProperty(left, right, type);
}
else
{
return new ConvertibleMatchProperty(left, right, type);
}
}
leftType = leftType.GetGenericArguments()[0];
}
if (leftType.IsEnum)
{
return new EnumMatchProperty(left, right, leftType);
}
else
{
if (leftType.IsEnum)
{
return new EnumMatchProperty(left, right, leftType);
}
else
{
return new ConvertibleMatchProperty(left, right, leftType);
}
return new ConvertibleMatchProperty(left, right, leftType);
}
}
if (valueType && leftType.IsValueType)
Expand Down
4 changes: 2 additions & 2 deletions Applied/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 您可以指定所有的值,或將組建編號或修訂編號設為預設值
//方法是使用 '*',如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.1.4")]
[assembly: AssemblyFileVersion("1.2.1.4")]
[assembly: AssemblyVersion("1.2.1.5")]
[assembly: AssemblyFileVersion("1.2.1.5")]

0 comments on commit 4fc26d1

Please sign in to comment.