Ejemplo n.º 1
0
 static ServiceContainer()
 {
     if (Environment.AppSettings.DemoMode)
     {
         /*
          *              UserService = new Mock.UserService();
          *              StatusService = new Mock.SettingsService();
          *              AlertService = new Mock.AlertService();
          *              DeviceService = new Mock.DeviceService();
          *              SensorService = new Mock.SensorService();
          *              StationService = new Mock.StationService();
          *              CircuitService = new Mock.CircuitService();
          *              ProgramService = new Mock.ProgramService();
          */
     }
     else
     {
         UserService    = new UserService();
         StatusService  = new SettingsService();
         AlertService   = new AlertService();
         DeviceService  = new DeviceService();
         SensorService  = new SensorService();
         StationService = new StationService();
         CircuitService = new CircuitService();
         ProgramService = new ProgramService();
         PivotService   = new StartPivotDeviceService();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Clears/invalidates all caches in all services.
 /// </summary>
 public static void InvalidateCache()
 {
     UserService?.ClearCache();
     StatusService?.ClearCache();
     AlertService?.ClearCache();
     DeviceService?.ClearCache();
     SensorService?.ClearCache();
     StationService?.ClearCache();
     CircuitService?.ClearCache();
     ProgramService?.ClearCache();
     PivotService?.ClearCache();
 }