Skip to content

Commit

Permalink
fix warnings/code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-jung committed May 19, 2020
1 parent 4900a51 commit d54629d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WoL/Data/HostService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task Delete(int id)

public async Task<Host> Find(int id)
{
return await context.Hosts.FindAsync(id);
return await context.Hosts.FindAsync(id).ConfigureAwait(false);
}
}
}
3 changes: 2 additions & 1 deletion WoL/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;

Expand All @@ -9,7 +10,7 @@ public static class StringExtensions
{
public static byte[] ParseMacAddress(this string mac)
{
var macString = mac?.Replace(":", "-", StringComparison.Ordinal)?.ToUpper() ?? throw new ArgumentNullException(nameof(mac));
var macString = mac?.Replace(":", "-", StringComparison.Ordinal)?.ToUpper(CultureInfo.InvariantCulture) ?? throw new ArgumentNullException(nameof(mac));
return System.Net.NetworkInformation.PhysicalAddress.Parse(macString).GetAddressBytes();
}

Expand Down
2 changes: 1 addition & 1 deletion WoL/Services/CompositePingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public CompositePingService(IAddressLookupService addressLookupService, RdpPortP
this.icmpPing = icmpPing;
}

public async override Task<bool> IsReachable(IPAddress ip, TimeSpan timeout)
public override async Task<bool> IsReachable(IPAddress ip, TimeSpan timeout)
{
// start pings in parallel
var rdp = rdpPing.IsReachable(ip, timeout);
Expand Down

0 comments on commit d54629d

Please sign in to comment.