Skip to content

Commit

Permalink
Updating for compilation with .NET Standard 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Sep 19, 2017
1 parent d05f1f8 commit a4a6246
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dotnet/src/webdriver/Firefox/Internal/Executable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private static string LocateFirefoxBinaryFromPlatform()
string binary = string.Empty;
if (Platform.CurrentPlatform.IsPlatformType(PlatformType.Windows))
{
#if !NETCOREAPP2_0
#if !NETCOREAPP2_0 && !NETSTANDARD2_0
// NOTE: This code is legacy, and will be removed. It will not be
// fixed for the .NET Core case.
// Look first in HKEY_LOCAL_MACHINE, then in HKEY_CURRENT_USER
Expand Down Expand Up @@ -164,7 +164,7 @@ private static string LocateFirefoxBinaryFromPlatform()
};

binary = GetExecutablePathUsingDefaultInstallLocations(windowsDefaultInstallLocations, "Firefox.exe");
#if !NETCOREAPP2_0
#if !NETCOREAPP2_0 && !NETSTANDARD2_0
}
#endif
}
Expand Down Expand Up @@ -206,7 +206,7 @@ private static string LocateFirefoxBinaryFromPlatform()
return FindBinary(new string[] { "firefox3", "firefox" });
}

#if !NETCOREAPP2_0
#if !NETCOREAPP2_0 && !NETSTANDARD2_0
private static string GetExecutablePathUsingRegistry(RegistryKey mozillaKey)
{
// NOTE: This code is legacy, and will be removed. It will not be
Expand Down
6 changes: 3 additions & 3 deletions dotnet/src/webdriver/Screenshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// </copyright>

using System;
#if NETCOREAPP2_0
#if NETCOREAPP2_0 || NETSTANDARD2_0
using ImageSharp;
using ImageSharp.Formats;
#else
Expand Down Expand Up @@ -104,7 +104,7 @@ public void SaveAsFile(string fileName, ScreenshotImageFormat format)
{
using (MemoryStream imageStream = new MemoryStream(this.byteArray))
{
#if NETCOREAPP2_0
#if NETCOREAPP2_0 || NETSTANDARD2_0
Image<Rgba32> image = Image.Load(imageStream);
using (FileStream fileStream = new FileStream(fileName, FileMode.Create))
{
Expand All @@ -126,7 +126,7 @@ public override string ToString()
return this.base64Encoded;
}

#if NETCOREAPP2_0
#if NETCOREAPP2_0 || NETSTANDARD2_0
private static IImageFormat ConvertScreenshotImageFormat(ScreenshotImageFormat format)
{
IImageFormat returnedFormat = ImageFormats.Png;
Expand Down

0 comments on commit a4a6246

Please sign in to comment.