Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Investigate Reflection framework #37

Open
Przytua opened this issue Jan 26, 2017 · 2 comments · May be fixed by #43
Open

Investigate Reflection framework #37

Przytua opened this issue Jan 26, 2017 · 2 comments · May be fixed by #43
Assignees
Labels

Comments

@Przytua
Copy link
Contributor

Przytua commented Jan 26, 2017

No description provided.

@Przytua Przytua self-assigned this Jan 26, 2017
@Przytua
Copy link
Contributor Author

Przytua commented Jan 26, 2017

I've investigated this Reflection framework: https://github.com/Zewo/Reflection

  • Unfortunately, construct functions work only with structs, so we won't get rid of Injectable protocol.
  • It is possible to retrieve all properties names and types (👍) even for classes
  • It is possible to set value to a property, using string with the property name (👍) in both structs and classes instances

So it seems like there's a possibility to get rid of injectDependencies(injector: Injecting) function, and replace it with something like func swifjectionRequiredProperties() -> [String] which will return array of properties names to inject, and Swifjection would do the rest.

I will propose a pull request with this change, probably later today.

@Przytua
Copy link
Contributor Author

Przytua commented Mar 6, 2019

This is solved in #43 using KeyPaths

@Przytua Przytua linked a pull request Mar 6, 2019 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant