123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using FlutterCodeGenerator.Map.Interface;
- using FlutterCodeGenerator.ModelTypes;
- using System.Collections.Generic;
- namespace FlutterCodeGenerator.Model
- {
- internal class GenerateDataCache
- {
- private static GenerateDataCache _instance;
- private IServiceMap _currentServiceMap;
- public static GenerateDataCache Instance => _instance ?? (_instance = new GenerateDataCache());
- public Dictionary<ComplexModelType, string> AlreadyGeneratedList { get; }
- public Dictionary<string, Dictionary<ModelType, int>> ConflictModelTypeList { get; }
- public string CurrentService { get; set; }
- public string CurrentMethod { get; set; }
- public string CurrentParameter { get; set; }
- public bool IsLoadFinished { get; set; }
- public bool IsGenerateFinished { get; set; }
- public string CurrentGenerator { get; set; }
- public GenerateDataCache()
- {
- AlreadyGeneratedList = new Dictionary<ComplexModelType, string>();
- ConflictModelTypeList = new Dictionary<string, Dictionary<ModelType, int>>();
- }
- public void SetCurrentServiceMap(IServiceMap serviceMap)
- {
- CurrentService = serviceMap.ServiceName;
- _currentServiceMap = serviceMap;
- }
- public IServiceMap GetCurrentServiceMap()
- {
- return _currentServiceMap;
- }
- }
- }
|