Skip to content

Entity interfaces to use generated code in external library #896

@x00Pavel

Description

@x00Pavel

The problem

There is no way how to use/reference generated code in an external library shipped as a Nuget package.
If I want to make some automation (library) based on generated code (especially, data types and extension methods), this automation has to be shared as source code from GitHub as the Nuget package won't be packed as this external library doesn't know anything about generated code.

The proposed solution

In generated code use interfaces that are defined in the HASS model.
Then use defined interfaces in the external library.

The alternatives

Move common extension methods to the HASS model and refactor them to use mentioned Interfaces.

Additional context

The biggest problem is in extension methods as there is no way how to define in interfaces possible extension methods.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions