public void Start(StartServiceContext context) { m_locator = new Geolocator { MovementThreshold = C.Default.MovementThreshold }; m_locator.PositionChanged += PositionChanged_Locator; }
public void Start(StartServiceContext context) { m_source = new CancellationTokenSource(); var token = m_source.Token; m_updateTask = Task .Delay(Delay_InitialUpdateStations, token) .ContinueWith(t => UpdateStations(token), token) ; }
public static void Start(StartServiceContext context) { var state = SetState(States.Started); if (state == States.Stopped) { StartService (App, context); StartService (Log, context); StartService (Locator, context); StartService (Stations, context); } }
public void Start(StartServiceContext context) { m_isRunning = true; Services.App.Async_Invoke(AsyncGroup.Log_UpdateErrors, Log_UpdateErrors); }
public void Start(StartServiceContext context) { Runner = context.Runner ; if (State == null) { State= CreateEmptyState() ; } }
static void StartService(this IService service, StartServiceContext context) { if (service != null) { try { service.Start(context); } catch (Exception exc) { Source.Common.Log.Exception ("Failed to start service {0}: {1}", service.GetType().Name, exc); } } }