We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7a091a commit c54634fCopy full SHA for c54634f
Rules/AvoidAlias.cs
@@ -62,11 +62,31 @@ private void SetProperties()
62
return;
63
}
64
IEnumerable<string> aliases = obj as IEnumerable<string>;
65
- if (obj == null)
+ if (aliases == null)
66
{
67
- return;
+ // try with enumerable objects
68
+ var enumerableObjs = obj as IEnumerable<object>;
69
+ if (enumerableObjs == null)
70
+ {
71
+ return;
72
+ }
73
+ foreach (var x in enumerableObjs)
74
75
+ var y = x as string;
76
+ if (y == null)
77
78
79
80
+ else
81
82
+ whiteList.Add(y);
83
84
85
86
87
88
+ whiteList.AddRange(aliases);
89
- whiteList.AddRange(aliases);
90
91
92
/// <summary>
0 commit comments