You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
727 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace JT809.Protocol
  5. {
  6. public sealed class JT809GlobalConfig
  7. {
  8. private static readonly Lazy<JT809GlobalConfig> instance = new Lazy<JT809GlobalConfig>(() => new JT809GlobalConfig());
  9. private JT809GlobalConfig(){}
  10. public static JT809GlobalConfig Instance
  11. {
  12. get
  13. {
  14. return instance.Value;
  15. }
  16. }
  17. public IJT809Encrypt JT809Encrypt { get; private set; }
  18. public JT809GlobalConfig SetJT809Encrypt(IJT809Encrypt jT809Encrypt)
  19. {
  20. instance.Value.JT809Encrypt = jT809Encrypt;
  21. return instance.Value;
  22. }
  23. }
  24. }