internal void InitializeInternal() { if (Status != WorkerServiceStatus.NotInitialized) { return; } if (_context == null) { _context = CreateWorkerContext(); } if (Status == WorkerServiceStatus.NotInitialized) { try { _instance.Initialize(_context); Status = WorkerServiceStatus.Sleeping; } catch (Exception ex) { _context.Logger.LogException("Error on initialize service", ex, Priority.High); _errors.Add(ex); Status = WorkerServiceStatus.Faulted; return; } } }
internal void InitializeInternal() { if (Status != WorkerServiceStatus.NotInitialized) return; if (_context == null) _context = CreateWorkerContext(); if (Status == WorkerServiceStatus.NotInitialized) { try { _instance.Initialize(_context); Status = WorkerServiceStatus.Sleeping; } catch (Exception ex) { _context.Logger.LogException("Error on initialize service", ex, Priority.High); _errors.Add(ex); Status = WorkerServiceStatus.Faulted; return; } } }