mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
Merge branch 'feat/SPlusUtils' of Common/Utils into dev
This commit is contained in:
commit
798e9cc0a7
3 changed files with 26 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- Added SPlusUtils with ConvertToInt method taking LowWord/HighWord ushorts
|
||||
|
||||
## [9.2.0] - 2019-03-01
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@
|
|||
<Compile Include="SafeCriticalSection.SimplSharp.cs" />
|
||||
<Compile Include="SafeCriticalSection.Standard.cs" />
|
||||
<Compile Include="SafeMutex.cs" />
|
||||
<Compile Include="SPlusUtils.cs" />
|
||||
<Compile Include="Sqlite\eDbType.cs" />
|
||||
<Compile Include="Sqlite\IcdDbDataReader.cs" />
|
||||
<Compile Include="Sqlite\IcdSqliteCommand.cs" />
|
||||
|
|
|
|||
23
ICD.Common.Utils/SPlusUtils.cs
Normal file
23
ICD.Common.Utils/SPlusUtils.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using ICD.Common.Properties;
|
||||
|
||||
namespace ICD.Common.Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Static class containing useful utilities for use in S+ programs
|
||||
/// </summary>
|
||||
[PublicAPI("S+")]
|
||||
public static class SPlusUtils
|
||||
{
|
||||
/// <summary>
|
||||
/// Convert two ushort's to an int
|
||||
/// </summary>
|
||||
/// <param name="lowWord">ushort for the least significant 16 bits</param>
|
||||
/// <param name="highWord">ushort for the most significant 1 bits</param>
|
||||
/// <returns></returns>
|
||||
[PublicAPI("S+")]
|
||||
public static int ConvertToInt(ushort lowWord, ushort highWord)
|
||||
{
|
||||
return (highWord << 16) + lowWord;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue