Closed
Description
DefaultTestAssemblyBuilder.Build()
contains code which maps values in an IDictionary<string, object>
to statically defined properties. The current code uses the following pattern:
if (options.ContainsKey(name))
{
var value = options[name] as {Type};
if (value != null)
{
// Sets the property here
}
}
I think this code predated the addition of TryGetValue()
in the .net framework. We should consider updating it to use TryGetValue
along with any other modernizations like pattern matching.