Skip to content

Commit

Permalink
Object members support added
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyNefyodov committed Nov 28, 2023
1 parent 793a66d commit 90a6c3b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions RevitLookup/Core/Metadata/DescriptorBuilder.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,16 @@ public sealed partial class DescriptorBuilder
private IReadOnlyCollection<Descriptor> BuildInstanceObject(Type type)
{
var types = new List<Type>();
while (type is not null)
while (type != null)
{
if (type.BaseType is not null)
if (type.BaseType != null || _settings.IsObjectMembersAllowed)
{
types.Add(type);
}
else if (_settings.IsObjectMembersAllowed)
{
types.Add(type);
}
type = type?.BaseType;
type = type.BaseType;
}


for (var i = types.Count - 1; i >= 0; i--)
{
_type = types[i];
Expand Down

0 comments on commit 90a6c3b

Please sign in to comment.