Skip to content

Commit

Permalink
Update test fx
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Mar 5, 2019
1 parent cd13f2f commit c865f84
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 21 deletions.
12 changes: 5 additions & 7 deletions src/Unosquare.Swan.Lite/Components/ObjectMapper.cs
Expand Up @@ -279,14 +279,12 @@ private static bool TrySetValue(PropertyInfo propertyInfo, Tuple<Type, object> p
return true;
}

if (!type.IsValueType() && propertyInfo.PropertyType == type)
{
propertyInfo.SetValue(target, GetValue(value, propertyInfo.PropertyType));
if (type.IsValueType() || propertyInfo.PropertyType != type)
return propertyInfo.TrySetBasicType(value, target);

propertyInfo.SetValue(target, GetValue(value, propertyInfo.PropertyType));

return true;
}

return propertyInfo.TrySetBasicType(value, target);
return true;
}
catch
{
Expand Down
2 changes: 1 addition & 1 deletion src/Unosquare.Swan.Lite/Extensions.ValueTypes.cs
Expand Up @@ -127,7 +127,7 @@ public static byte[] ToBytes<T>(this T obj)
/// contained in longBytes.
/// </returns>
public static uint SwapEndianness(this ulong longBytes)
=> (uint) (((longBytes & 0x000000ff) << 24) +
=> (uint)(((longBytes & 0x000000ff) << 24) +
((longBytes & 0x0000ff00) << 8) +
((longBytes & 0x00ff0000) >> 8) +
((longBytes & 0xff000000) >> 24));
Expand Down
2 changes: 1 addition & 1 deletion src/Unosquare.Swan.Lite/Terminal.cs
Expand Up @@ -229,7 +229,7 @@ public static void Flush(TimeSpan? timeout = null)
/// <param name="top">The top.</param>
public static void SetCursorPosition(int left, int top)
{
if (IsConsolePresent == false) return;
if (!IsConsolePresent) return;

lock (SyncLock)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Unosquare.Swan.Lite/Unosquare.Swan.Lite.csproj
Expand Up @@ -27,13 +27,13 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.5.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.5.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Unosquare.Swan/Components/CircularBuffer.cs
Expand Up @@ -13,7 +13,7 @@ namespace Unosquare.Swan.Components
public sealed class CircularBuffer : IDisposable
{
private readonly object _syncLock = new object();
private IntPtr _buffer = IntPtr.Zero;
private IntPtr _buffer;

/// <summary>
/// Initializes a new instance of the <see cref="CircularBuffer"/> class.
Expand Down
4 changes: 4 additions & 0 deletions src/Unosquare.Swan/Components/DelayProvider.cs
Expand Up @@ -34,7 +34,9 @@ public sealed class DelayProvider : IDisposable
private readonly Stopwatch _delayStopwatch = new Stopwatch();

private bool _isDisposed;
#if !NETSTANDARD1_3
private IWaitEvent _delayEvent;
#endif

/// <summary>
/// Initializes a new instance of the <see cref="DelayProvider"/> class.
Expand Down Expand Up @@ -111,7 +113,9 @@ public void Dispose()
{
if (_isDisposed) return;
_isDisposed = true;
#if !NETSTANDARD1_3
_delayEvent?.Dispose();
#endif
}
}

Expand Down
1 change: 0 additions & 1 deletion src/Unosquare.Swan/Exceptions/JsonRequestException.cs
Expand Up @@ -12,7 +12,6 @@
public class JsonRequestException
: Exception
{
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="T:Unosquare.Swan.Exceptions.JsonRequestException" /> class.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Unosquare.Swan/Network.cs
Expand Up @@ -190,7 +190,7 @@ public static Task<IPAddress[]> GetDnsHostEntryAsync(string fqdn)
/// <returns>
/// An array of local ip addresses of the result produced by this task.
/// </returns>
/// <exception cref="ArgumentNullException">fqdn</exception>
/// <exception cref="ArgumentNullException">fqdn.</exception>
public static async Task<IPAddress[]> GetDnsHostEntryAsync(string fqdn, IPAddress dnsServer, int port)
{
if (fqdn == null)
Expand Down
3 changes: 1 addition & 2 deletions src/Unosquare.Swan/Networking/Enums.Smtp.cs
Expand Up @@ -2,9 +2,8 @@
namespace Unosquare.Swan.Networking
{
#if NETSTANDARD1_3

/// <summary>
/// Defines the different SMTP status codes
/// Defines the different SMTP status codes.
/// </summary>
public enum SmtpStatusCode
{
Expand Down
1 change: 0 additions & 1 deletion src/Unosquare.Swan/Unosquare.Swan.csproj
Expand Up @@ -18,7 +18,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions test/Unosquare.Swan.Test/Unosquare.Swan.Test.csproj
Expand Up @@ -15,17 +15,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.4.0">
<PackageReference Include="coverlet.msbuild" Version="2.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<packagereference Include="NUnit3TestAdapter" Version="3.11.2"></packagereference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<packagereference Include="NUnit3TestAdapter" Version="3.13.0"></packagereference>
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Portable.BouncyCastle" Version="1.8.4" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.5" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
Expand Down

0 comments on commit c865f84

Please sign in to comment.