Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created December 22, 2011 15:18
Show Gist options
  • Select an option

  • Save mgroves/1510659 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/1510659 to your computer and use it in GitHub Desktop.
instead of using PostSharp for IoC
// use the service locator
ServiceLocator.Context = ((Context)this).ApplicationContext.ApplicationContext; // you only need to do this once in the lifetime of your Android app
_presenter = ServiceLocator.Get(typeof(IMainPresenter));
// or a plain old 'new'
_presenter = new MainPresenter(new AndroidSqlitePortfolioRepository((Context)this))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment