What is Nostr?
P-Y /
npub19ww…g5sa
2024-01-17 06:15:37
in reply to nevent1q…y9we

P-Y on Nostr: It's now easy to add factories... but we would also very much like to make it easy to ...

It's now easy to add factories... but we would also very much like to make it easy to get instances from our Toot based Dependency Injection Framework

Let's add a `get()` method to pull a factory and then invoke that lambda factory:

```
inline fun <reified T> Linker.get(): T {
return factories.getValue(T::class.java)() as T
}
```
Author Public Key
npub19wwxc29uufy6rmegf9aza3hkcqdu00s8yyfyhr88mglptysgp3tsz7g5sa