Archived
修复了枚举状态扩展中隐藏的缺陷;
添加了在列表中随机获取项目的扩展; 添加了数值转中文格式的繁体字库;
This commit is contained in:
@@ -188,7 +188,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater(this Enum target)
|
||||
{
|
||||
return target.EnumToInt32() > 0;
|
||||
return target.EnumToInt32() != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -198,7 +198,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater(this Enum target, Enum value)
|
||||
{
|
||||
return (target.EnumToInt32() & value.EnumToInt32()) > 0;
|
||||
return (target.EnumToInt32() & value.EnumToInt32()) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -208,7 +208,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater1(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 01) > 0;
|
||||
return (target.EnumToInt32() & 01) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -218,7 +218,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater2(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 02) > 0;
|
||||
return (target.EnumToInt32() & 02) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -228,7 +228,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater3(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 04) > 0;
|
||||
return (target.EnumToInt32() & 04) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -238,7 +238,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater4(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 010) > 0;
|
||||
return (target.EnumToInt32() & 010) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -248,7 +248,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater5(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 020) > 0;
|
||||
return (target.EnumToInt32() & 020) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -258,7 +258,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater6(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 030) > 0;
|
||||
return (target.EnumToInt32() & 030) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -268,7 +268,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater7(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 040) > 0;
|
||||
return (target.EnumToInt32() & 040) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -278,7 +278,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool EnumGreater8(this Enum target)
|
||||
{
|
||||
return (target.EnumToInt32() & 0100) > 0;
|
||||
return (target.EnumToInt32() & 0100) != 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user