aerogear-xamarin-sdk
AeroGear Xamarin SDK
AeroGear.Mobile.Core.MobileCore Class Reference

MobileCore is the entry point into AeroGear mobile services. More...

Public Member Functions

void Destroy ()
 Called when mobile core instance needs to be destroyed. More...
 
RegisterService< T > (T serviceModule)
 Registers an instance of a service module. More...
 
GetService< T > ()
 
GetService< T > (string serviceId)
 
ServiceConfiguration [] GetServiceConfigurationByType (String type)
 Returns array of ServiceConfiguration, filtered by type More...
 
ServiceConfiguration GetFirstServiceConfigurationByType (String type)
 Returns the first instance of a ServiceConfiguration based on the type key More...
 
ServiceConfiguration GetServiceConfigurationById (String id)
 Returns a ServiceConfiguration based on the id key More...
 

Static Public Member Functions

static MobileCore Init ()
 Initializes MobileCore with defaults and without platform-specific injector. More...
 
static MobileCore Init (IPlatformInjector injector)
 Initializes MobileCore with defaults and with platform-specific injector. More...
 
static MobileCore Init (IPlatformInjector injector, Options options)
 Initializes MobileCore with specific options and with platform-specific injector. More...
 

Public Attributes

const String DEFAULT_CONFIG_FILE_NAME = "mobile-services.json"
 The default name of the config file. More...
 

Protected Member Functions

 MobileCore (IPlatformInjector injector, Options options)
 

Properties

ILogger Logger [get]
 Gets the logger for the current platform More...
 
String ConfigFileName [get]
 Gets the name of the config file. More...
 
static MobileCore Instance [get]
 Holds MobileCore singleton instance. It's needed to initialize core before using this. More...
 
IHttpServiceModule HttpLayer [get]
 Gets HTTP service module of the MobileCore. More...
 

Detailed Description

MobileCore is the entry point into AeroGear mobile services.

Constructor & Destructor Documentation

◆ MobileCore()

AeroGear.Mobile.Core.MobileCore.MobileCore ( IPlatformInjector  injector,
Options  options 
)
protected

Member Function Documentation

◆ Destroy()

void AeroGear.Mobile.Core.MobileCore.Destroy ( )

Called when mobile core instance needs to be destroyed.

◆ GetFirstServiceConfigurationByType()

ServiceConfiguration AeroGear.Mobile.Core.MobileCore.GetFirstServiceConfigurationByType ( String  type)

Returns the first instance of a ServiceConfiguration based on the type key

Parameters
typetype field of the configuration
Returns
a single ServiceConfiguration

◆ GetService< T >() [1/2]

T AeroGear.Mobile.Core.MobileCore.GetService< T > ( )
Type Constraints
T :IServiceModule 
T :GetService<T> 
T :typeof 
T :T 

◆ GetService< T >() [2/2]

T AeroGear.Mobile.Core.MobileCore.GetService< T > ( string  serviceId)
Type Constraints
T :IServiceModule 
T :GetService<T> 
T :typeof 
T :T 
T :GetServiceConfigurationById 
T :serviceId 

◆ GetServiceConfigurationById()

ServiceConfiguration AeroGear.Mobile.Core.MobileCore.GetServiceConfigurationById ( String  id)

Returns a ServiceConfiguration based on the id key

Parameters
idid field of the configuration
Returns
a single ServiceConfiguration

◆ GetServiceConfigurationByType()

ServiceConfiguration [] AeroGear.Mobile.Core.MobileCore.GetServiceConfigurationByType ( String  type)

Returns array of ServiceConfiguration, filtered by type

Parameters
typetype field of the configuration
Returns
array of ServiceConfiguration

◆ Init() [1/3]

static MobileCore AeroGear.Mobile.Core.MobileCore.Init ( )
static

Initializes MobileCore with defaults and without platform-specific injector.

Returns
MobileCore singleton instance

◆ Init() [2/3]

static MobileCore AeroGear.Mobile.Core.MobileCore.Init ( IPlatformInjector  injector)
static

Initializes MobileCore with defaults and with platform-specific injector.

Parameters
injectorplatform specific implementation dependency injection module
Returns
MobileCore singleton instance

◆ Init() [3/3]

static MobileCore AeroGear.Mobile.Core.MobileCore.Init ( IPlatformInjector  injector,
Options  options 
)
static

Initializes MobileCore with specific options and with platform-specific injector.

Parameters
injectorplatform specific implementation dependency injection module
optionsinitialization options
Returns
MobileCore singleton instance

◆ RegisterService< T >()

T AeroGear.Mobile.Core.MobileCore.RegisterService< T > ( serviceModule)

Registers an instance of a service module.

Returns
The registered service module.
Parameters
serviceModuleThe service module instance.
Template Parameters
Tservice module type.
Type Constraints
T :IServiceModule 

Member Data Documentation

◆ DEFAULT_CONFIG_FILE_NAME

const String AeroGear.Mobile.Core.MobileCore.DEFAULT_CONFIG_FILE_NAME = "mobile-services.json"

The default name of the config file.

Property Documentation

◆ ConfigFileName

String AeroGear.Mobile.Core.MobileCore.ConfigFileName
get

Gets the name of the config file.

The name of the config file.

◆ HttpLayer

IHttpServiceModule AeroGear.Mobile.Core.MobileCore.HttpLayer
get

Gets HTTP service module of the MobileCore.

◆ Instance

MobileCore AeroGear.Mobile.Core.MobileCore.Instance
staticget

Holds MobileCore singleton instance. It's needed to initialize core before using this.

◆ Logger

ILogger AeroGear.Mobile.Core.MobileCore.Logger
get

Gets the logger for the current platform

The logger.


The documentation for this class was generated from the following file: