public bool TryGetPropertyByName(string propertyName, bool ignoreCase, out PropertySpec propertySpec)
{
var stringComparison = ignoreCase
? StringComparison.InvariantCultureIgnoreCase
: StringComparison.InvariantCulture;
// TODO: Possible to optimize here by putting property names in a dictionary
propertySpec = Properties.FirstOrDefault(x => string.Equals(x.Name, propertyName, stringComparison));
return propertySpec != null;
}