Merge branch 'feat/localization' of Common/Utils into ConnectPro_v1.3

This commit is contained in:
Jeffery Thompson
2019-05-10 18:35:34 +00:00
committed by Gogs
6 changed files with 1082 additions and 7 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -45,5 +45,10 @@
<PackageReference Include="System.Net.NetworkInformation" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<None Update="CultureInfo.sqlite">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@@ -101,6 +101,9 @@
<Compile Include="EventArguments\StringEventArgs.cs" />
<Compile Include="EventArguments\UShortEventArgs.cs" />
<Compile Include="EventArguments\XmlRecursionEventArgs.cs" />
<None Include="CultureInfo.sqlite">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="ObfuscationSettings.cs" />
<Compile Include="Extensions\BoolExtensions.cs" />
<Compile Include="Extensions\ByteExtensions.cs" />
@@ -113,6 +116,7 @@
<Compile Include="Extensions\ParameterInfoExtensions.cs" />
<Compile Include="Extensions\UriExtensions.cs" />
<Compile Include="Extensions\UShortExtensions.cs" />
<Compile Include="Globalization\IcdCultureInfo.cs" />
<Compile Include="IcdUriBuilder.cs" />
<Compile Include="IO\Compression\IcdZipEntry.cs" />
<Compile Include="IO\IcdBinaryReader.cs" />

View File

@@ -34,5 +34,30 @@ namespace ICD.Common.Utils.Sqlite
{
return m_Reader.Read();
}
public int GetInt32(int ordinal)
{
return m_Reader.GetInt32(ordinal);
}
public bool GetBoolean(int ordinal)
{
return m_Reader.GetBoolean(ordinal);
}
public string GetString(int ordinal)
{
return m_Reader.GetString(ordinal);
}
public int GetOrdinal(string name)
{
return m_Reader.GetOrdinal(name);
}
public void Close()
{
m_Reader.Close();
}
}
}

View File

@@ -6,22 +6,27 @@ using Microsoft.Data.Sqlite;
namespace ICD.Common.Utils.Sqlite
{
public sealed class IcdSqliteParameterCollection
{
private readonly SqliteParameterCollection m_Parameters;
public sealed class IcdSqliteParameterCollection
{
private readonly SqliteParameterCollection m_Parameters;
/// <summary>
/// Constructor.
/// </summary>
/// <param name="commandParameters"></param>
public IcdSqliteParameterCollection(SqliteParameterCollection commandParameters)
public IcdSqliteParameterCollection(SqliteParameterCollection commandParameters)
{
m_Parameters = commandParameters;
}
public IcdSqliteParameter Add(string name, eDbType type)
{
{
return new IcdSqliteParameter(m_Parameters.Add(name, type.ToParamType()));
}
}
}
public void AddWithValue(string parameterName, object value)
{
m_Parameters.AddWithValue(parameterName, value);
}
}
}