GenerateDataCache.cs 967 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections.Generic;
  2. namespace FlutterCodeGenerator
  3. {
  4. internal class GenerateDataCache
  5. {
  6. private static GenerateDataCache _instance;
  7. private ServiceMap _currentServiceMap;
  8. public static GenerateDataCache Instance => _instance ?? (_instance = new GenerateDataCache());
  9. public Dictionary<ComplexModelType, string> AlreadyGeneratedList { get; }
  10. public Dictionary<string, Dictionary<ModelType, int>> ConflictModelTypeList { get; }
  11. public GenerateDataCache()
  12. {
  13. AlreadyGeneratedList = new Dictionary<ComplexModelType, string>();
  14. ConflictModelTypeList = new Dictionary<string, Dictionary<ModelType, int>>();
  15. }
  16. public void SetCurrentServiceMap(ServiceMap serviceMap)
  17. {
  18. _currentServiceMap = serviceMap;
  19. }
  20. public ServiceMap GetCurrentServiceMap()
  21. {
  22. return _currentServiceMap;
  23. }
  24. }
  25. }