Skip to content

Class Factor Source Generator #1691

@shmuelie

Description

@shmuelie

Is your feature request related to a problem? Please describe.
When a COM interface is implemented, a class factory with GeneratedComClass is needed and manually created.

Describe the solution you'd like
A source generator that creates a basic implementation of IClassFactory

Describe alternatives you've considered
Hand coding it

Implementation Ideas

  1. A GeneratedClassFactory attribute on the implementing class that results in a generated class factory.
[GeneratedComClass]
[GeneratedClassFactory]
class Foo : IFoo {}

// Generates:
class FooFactory : IClassFactory { /*..*/ }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions