private static bool IsIndexer(PropertyInfo propertyInfo)
{
if (propertyInfo == null)
throw new ArgumentNullException("propertyInfo");
var indexParameters = propertyInfo.GetIndexParameters();
return indexParameters != null
&& indexParameters.Length > 0
&& indexParameters[0].ParameterType == typeof(string);
}