Skip to content

Commit

Permalink
Fix up code generated by roslyn fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
Keegan Caruso committed Aug 6, 2024
1 parent 7fb0c2d commit 399fcd8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Microsoft.IdentityModel.Logging/LogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,19 @@ public static void LogWarning(string message, params object[] args)
Logger.Log(WriteEntry(eventLogLevel, innerException, message, null));

if (innerException != null)
{
if (string.IsNullOrEmpty(argumentName))
return (T)Activator.CreateInstance(typeof(T), message, innerException);
else
return (T)Activator.CreateInstance(typeof(T), argumentName, message, innerException);
}
else
{
if (string.IsNullOrEmpty(argumentName))
return (T)Activator.CreateInstance(typeof(T), message);
else
return (T)Activator.CreateInstance(typeof(T), argumentName, message);
return (T)Activator.CreateInstance(typeof(T), message);
else
return (T)Activator.CreateInstance(typeof(T), argumentName, message);
}
}

private static EventLogLevel EventLevelToEventLogLevel(EventLevel eventLevel) =>
Expand Down

0 comments on commit 399fcd8

Please sign in to comment.