Skip to content

How to lazy pass in parameters for singleton? #276

Closed
@DanMossa

Description

@DanMossa

Hello!

I have a class with a constructor that takes a String.

I want this to be a singleton.

I also won't have the String to pass in during app startup.

How can I register a singleton that has a constructor and then pass in the parameters when getting that singleton?

I'm thinking maybe a factory singleton?

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