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 AlreadyGeneratedList { get; } public Dictionary> 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(); ConflictModelTypeList = new Dictionary>(); } public void SetCurrentServiceMap(IServiceMap serviceMap) { CurrentService = serviceMap.ServiceName; _currentServiceMap = serviceMap; } public IServiceMap GetCurrentServiceMap() { return _currentServiceMap; } } }