Skip to content

Commit

Permalink
Add base types with explicit XML type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Mar 10, 2023
1 parent bcb5850 commit 8ffaab8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Bonsai.Core/Bonsai.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PackageTags>Bonsai Rx Reactive Extensions</PackageTags>
<TargetFrameworks>net462;netstandard2.0;net6.0</TargetFrameworks>
<RootNamespace>Bonsai</RootNamespace>
<VersionPrefix>2.7.1</VersionPrefix>
<VersionPrefix>2.7.2</VersionPrefix>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Rx-Linq" Version="2.2.5" />
Expand Down
9 changes: 9 additions & 0 deletions Bonsai.Core/WorkflowBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,15 @@ static void AddExtensionType(HashSet<Type> types, Type type)
{
types.Add(xmlInclude[i].Type);
}

while (type.BaseType != null)
{
type = type.BaseType;
if (Attribute.IsDefined(type, typeof(XmlTypeAttribute)))
{
AddExtensionType(types, type);
}
}
}
}

Expand Down

0 comments on commit 8ffaab8

Please sign in to comment.