Skip to content

Cannot inherit from SVGElement due to two internal abstract properties #1162

@sunyudai

Description

@sunyudai

Description

I am trying to extend SvgElement with the intent to create some project specific types that will still render to proper svg. However, I am running into an issue where I cannot inherit from SvgElement directly because it has two members that are marked as both internal and abstract. These properties are ClassNames and AttributeName.

Used Versions / issue location

Found when referencing the 3.4.7 NuGet package for a .NET Framework 4.8 project, but I can see the issue in the master branch at SVG/Generators/AvailableElementsGenerator.cs on lines 248 and 250.

    internal abstract string AttributeName {{ get; }}

    internal abstract List<Type> ClassNames {{ get; }}

Edit: historical note - these properties have been marked internal abstract since 2021, the initial creation of the file.

Next Steps

I'm happy to quickly change that and create a Pull request if that is preferred, I'm opening the issue because I'm not quite clear on if there is a reason why these two properties might be marked as internal abstract.

If these should not be changed to, say, protected virtual, then what would be a more appropriate class to derive from?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions