From 61271578f53b585c7f37364ed212f2c8cc911943 Mon Sep 17 00:00:00 2001 From: Thomas Ardal Date: Thu, 7 Nov 2024 12:43:18 +0100 Subject: [PATCH] Changed order in ApplicationInfoHelper --- src/Elmah.Io.Client/ApplicationInfoHelper.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Elmah.Io.Client/ApplicationInfoHelper.cs b/src/Elmah.Io.Client/ApplicationInfoHelper.cs index 6e0f5ae..8caadc2 100644 --- a/src/Elmah.Io.Client/ApplicationInfoHelper.cs +++ b/src/Elmah.Io.Client/ApplicationInfoHelper.cs @@ -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)