Skip to content

Commit

Permalink
Changed order in ApplicationInfoHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Nov 7, 2024
1 parent 6e2f88f commit 6127157
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Elmah.Io.Client/ApplicationInfoHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public static string GetApplicationType()
#if NETSTANDARD2_0_OR_GREATER || NET45_OR_GREATER || NETCOREAPP2_0_OR_GREATER
var assemblies = AppDomain.CurrentDomain.GetAssemblies().ToList();
var processName = Process.GetCurrentProcess().ProcessName;
if (assemblies.Exists(a => a.FullName.StartsWith("System.Web")) && (processName == "w3wp" || processName == "iisexpress"))
return "aspnet";
else if (assemblies.Exists(a => a.FullName.StartsWith("Microsoft.Azure.Functions") || a.FullName.StartsWith("Microsoft.Azure.WebJobs")))
if (assemblies.Exists(a => a.FullName.StartsWith("Microsoft.Azure.Functions") || a.FullName.StartsWith("Microsoft.Azure.WebJobs")))
return "azurefunction";
else if (assemblies.Exists(a => a.FullName.StartsWith("Microsoft.AspNetCore")))
return "aspnetcore";
else if (assemblies.Exists(a => a.FullName.StartsWith("System.Windows.Forms") || a.FullName.StartsWith("PresentationCore") || a.FullName.StartsWith("WindowsBase")))
return "windowsapp";
if (assemblies.Exists(a => a.FullName.StartsWith("System.Web")) && (processName == "w3wp" || processName == "iisexpress"))
return "aspnet";
else if (Console.OpenStandardInput() != Stream.Null)
return "console";
else if (!Environment.UserInteractive)
Expand Down

0 comments on commit 6127157

Please sign in to comment.