SqliteManager.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using OHV.Common.Interfaces;
  7. using OHV.SqliteDAL.DAL;
  8. using Prism.Ioc;
  9. using Prism.Modularity;
  10. namespace OHV.SqliteDAL
  11. {
  12. [Module(ModuleName = "SqliteManager")]
  13. public class SqliteManager : ISqlManager, IModule
  14. {
  15. public ConfigDAL ConfigDal { get; set; }
  16. public RouteDAL RouteDal { get; set; }
  17. public CommandDAL CommandDAL { get; set; }
  18. public SubCmdDAL SubCmdDAL { get; set; }
  19. public AxisConfigDAL AxisConfigDAL { get; set; }
  20. public AxisPositionDataDAL AxisPositionDataDAL { get; set; }
  21. public AxisVelocityDataDAL AxisVelocityDataDAL { get; set; }
  22. public AlarmDAL AlarmDAL { get; set; }
  23. public HisAlarmDAL HisAlarmDAL { get; set; }
  24. public VehicleInfoDAL VehicleInfoDAL { get; set; }
  25. public SqliteManager()
  26. {
  27. this.ConfigDal = new ConfigDAL();
  28. this.RouteDal = new RouteDAL();
  29. this.SubCmdDAL = new SubCmdDAL();
  30. this.CommandDAL = new CommandDAL();
  31. this.AxisConfigDAL = new AxisConfigDAL();
  32. this.AxisPositionDataDAL = new AxisPositionDataDAL();
  33. this.AxisVelocityDataDAL = new AxisVelocityDataDAL();
  34. this.AlarmDAL = new AlarmDAL();
  35. this.HisAlarmDAL = new HisAlarmDAL();
  36. this.VehicleInfoDAL = new VehicleInfoDAL();
  37. }
  38. public void RegisterTypes(IContainerRegistry containerRegistry)
  39. {
  40. if (!containerRegistry.IsRegistered<SqliteManager>())
  41. containerRegistry.RegisterSingleton<SqliteManager>();
  42. }
  43. public void OnInitialized(IContainerProvider containerProvider)
  44. {
  45. }
  46. }
  47. }