Skip to Content
Mastering Xamarin.Forms - Second Edition
book

Mastering Xamarin.Forms - Second Edition

by Ed Snider
March 2018
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 4m
English
Packt Publishing
Content preview from Mastering Xamarin.Forms - Second Edition

Registering the platform-service implementations

We will start by creating Ninject Modules in each of the platform projects, which will be responsible for registering their respective platform's specific service implementations, as shown in the following steps:

  1. Add the Portable.Ninject NuGet package to each of the platform-specific projects.
  2. Next, create a new folder in the TripLog.iOS project named Modules.
  3. Create a new class in the Modules folder named TripLogPlatformModule that inherits from  Ninject.Modules.NinjectModule:
      public class TripLogPlatformModule : NinjectModule      {           // ...       }
  1. Override the Load method of the NinjectModule class and use the Ninject Bind method to register the iOS-specific implementation of ILocationService ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Xamarin.Forms - Third Edition

Mastering Xamarin.Forms - Third Edition

Ed Snider
Xamarin.Forms Projects - Second Edition

Xamarin.Forms Projects - Second Edition

Daniel Hindrikes, Johan Karlsson
Xamarin.Forms Projects

Xamarin.Forms Projects

Johan Karlsson, Daniel Hindrikes

Publisher Resources

ISBN: 9781788290265Supplemental Content