Skip to content

Would there be an advantage to moving the service setups from MainActivity and AppDelegate to the App class constructor? #223

Answered by brminnick
rs-mobitech asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @rscholey!

I don't really have a good reason for this. I guess I could add App to the Dependency Injection Container, here https://github.com/brminnick/GitTrends/blob/main/GitTrends/Services/ContainerService.cs

This would allow the code in both MainActivity and AppDelegate to be condensed to this:

  var app = ContainerService.Container.Resolve<App>();
  LoadApplication(app);

Is this the solution you had in mind?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rs-mobitech
Comment options

@brminnick
Comment options

Answer selected by rs-mobitech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #222 on February 25, 2021 16:24.