Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Fix HasProperty when settings is a Dictionary (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evolva authored Sep 16, 2020
1 parent 4898659 commit 9fe222c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protected virtual void HandleException(Exception ex, IEnumerable<LogEvent> event
// Helper function: checks if a given dynamic member / dictionary key exists at runtime
private static bool HasProperty(dynamic settings, string name)
{
if (settings is System.Dynamic.ExpandoObject)
if (settings is IDictionary<string, object>)
return ((IDictionary<string, object>)settings).ContainsKey(name);

if (settings is System.Dynamic.DynamicObject)
Expand Down

0 comments on commit 9fe222c

Please sign in to comment.