mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-13 19:55:02 +00:00
Merge branch 'boolAndUshortExtensions' of Common/Utils into dev
This commit is contained in:
10
ICD.Common.Utils/Extensions/BoolExtensions.cs
Normal file
10
ICD.Common.Utils/Extensions/BoolExtensions.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace ICD.Common.Utils.Extensions
|
||||
{
|
||||
public static class BoolExtensions
|
||||
{
|
||||
public static ushort ToUShort(this bool b)
|
||||
{
|
||||
return b ? (ushort)1 : (ushort)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
10
ICD.Common.Utils/Extensions/UshortExtensions.cs
Normal file
10
ICD.Common.Utils/Extensions/UshortExtensions.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace ICD.Common.Utils.Extensions
|
||||
{
|
||||
public static class UShortExtensions
|
||||
{
|
||||
public static bool ToBool(this ushort u)
|
||||
{
|
||||
return u != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,9 +88,11 @@
|
||||
<Compile Include="EventArguments\UShortEventArgs.cs" />
|
||||
<Compile Include="EventArguments\XmlRecursionEventArgs.cs" />
|
||||
<None Include="ObfuscationSettings.cs" />
|
||||
<Compile Include="Extensions\BoolExtensions.cs" />
|
||||
<Compile Include="Extensions\ByteExtensions.cs" />
|
||||
<Compile Include="Extensions\ListExtensions.cs" />
|
||||
<Compile Include="Comparers\PredicateEqualityComparer.cs" />
|
||||
<Compile Include="Extensions\UshortExtensions.cs" />
|
||||
<Compile Include="ProcessorUtils.SimplSharp.cs" />
|
||||
<Compile Include="ProcessorUtils.Standard.cs" />
|
||||
<Compile Include="ProgramUtils.SimplSharp.cs" />
|
||||
|
||||
Reference in New Issue
Block a user