Skip to content

Dependency injection

Luke edited this page Aug 27, 2013 · 6 revisions

While you're building your classes for automatic discovery, many of these classes will require access to the core's internal services.

If your class depends on one of our services, all you have to do is add it to your constructor and an instance will be passed in that you can work with.

The following services are available for insertion into your constructors:

IApplicationPaths

Contains a list of various application data paths

IIsoManager

Mounts and unmounts iso files

IJsonSerializer

Get access to the core's json serializer.

ILogManager

Create your own named logger. Log entries will appear in the application log file and will be prefixed with the name of the logger for ease of reading.

INavigationService

Navigates the user to a new page

IPlaybackManager

Controls media playback

IPresentationManager

Controls various aspects of the presentation - set backdrops, show message boxes, notifications, error messages, set the current page title, add and remove ResourceDictionaries, etc.

ITaskManager

Queue, execute and cancel scheduled tasks

ISessionManager

Provides access to the current user, and the ability to log-out.

IThemeManager

Controls the theming engine, and provides access to the current theme.

IUserInputManager

Enables the ability to respond to various forms of user input

IXmlSerializer

Get access to the core's xml serializer.