SG Factory

Jun 11, 2024

image

Imagine we have an abstract class A and its descendants A1, A2, A3, etc., and we want to operate with the descendants as instances of the base, while instantiating based on some metadata unambiguously representing which specific type of instance we need.
This problem can be solved implementing Factory pattern with source generators.

Read full article here...

Gefällt dir dieser Beitrag?

Kaufe Uprt Dev einen whisky

Mehr von Uprt Dev