diff --git a/source/RevitLookup/Core/Engine/DescriptorBuilder.Properties.cs b/source/RevitLookup/Core/Engine/DescriptorBuilder.Properties.cs index c81eeae4..7b2dae2d 100644 --- a/source/RevitLookup/Core/Engine/DescriptorBuilder.Properties.cs +++ b/source/RevitLookup/Core/Engine/DescriptorBuilder.Properties.cs @@ -33,7 +33,7 @@ private void AddProperties(BindingFlags bindingFlags) if (member.IsSpecialName) continue; object value; - var parameters = member.GetMethod!.GetParameters(); + var parameters = member.CanRead ? member.GetMethod!.GetParameters() : null; try { @@ -104,7 +104,7 @@ private bool IsPropertySupported(PropertyInfo member, ParameterInfo[] parameters value = new NotSupportedException("Property does not have a get accessor, it cannot be read"); return true; } - + if (parameters.Length > 0) { if (!_settings.IncludeUnsupported) return false;