DataRepository.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Abp.Dependency;
  2. using Abp.ObjectMapping;
  3. using MongoDB.Bson;
  4. using System;
  5. using Yunda.ISAS.MongoDB.Entities.DataMonitoring;
  6. using YunDa.ISAS.MongoDB.Repositories;
  7. namespace Yunda.ISAS.DataMonitoringServer.DataCenter
  8. {
  9. public class DataRepository : ISingletonDependency
  10. {
  11. public IMongoDbRepository<TeleAlarmResult, Guid> TeleAlarmResultRepository { get; }
  12. public IMongoDbRepository<TelemeteringResult, Guid> TelemeteringResultRepository;
  13. public IMongoDbRepository<TelemeteringHourStatisticsResult, Guid> TelemeteringHourStatisticsResultRepository { get; }
  14. public IMongoDbRepository<TelesignalisationResult, Guid> TelesignalisationResultRepository { get; }
  15. public IMongoDbRepository<TelecommandResult, Guid> TelecommandResultRepository { get; }
  16. public IMongoDbRepository<BsonDocument, Guid> BsonDocumentResultRepository { get; }
  17. [Obsolete("无法使用的")]
  18. public IObjectMapper ObjectMapper { get; }
  19. public DataRepository(IMongoDbRepository<TeleAlarmResult, Guid> teleAlarmResultRepository
  20. , IMongoDbRepository<BsonDocument, Guid> bsonDocumentResultRepository
  21. , IMongoDbRepository<TelemeteringResult, Guid> telemeteringResultRepository
  22. , IMongoDbRepository<TelemeteringHourStatisticsResult, Guid> telemeteringHourStatisticsResultRepository
  23. , IMongoDbRepository<TelesignalisationResult, Guid> telesignalisationResultRepository
  24. , IMongoDbRepository<TelecommandResult, Guid> telecommandResultRepository
  25. , IObjectMapper objectMapper)
  26. {
  27. TeleAlarmResultRepository = teleAlarmResultRepository;
  28. TelemeteringResultRepository = telemeteringResultRepository;
  29. TelemeteringHourStatisticsResultRepository = telemeteringHourStatisticsResultRepository;
  30. TelesignalisationResultRepository = telesignalisationResultRepository;
  31. TelecommandResultRepository = telecommandResultRepository;
  32. BsonDocumentResultRepository = bsonDocumentResultRepository;
  33. ObjectMapper = objectMapper;
  34. }
  35. }
  36. }