//private IntegrationService _integrationService; public ContextSetDiscoveryService(DonutContext ctx, IServiceProvider serviceProvider) { _context = ctx; _setFinder = new CacheSetFinder(); _setSource = new CacheSetSource(); _integrationService = (IIntegrationService)serviceProvider.GetService(typeof(IIntegrationService)); }
/// <summary> /// /// </summary> /// <param name="source"></param> /// <param name="type"></param> /// <returns></returns> public IDataSet GetOrAddDataSet(ICacheSetSource source, Type type) { if (!_dataSets.TryGetValue(type, out var set)) { set = source.CreateDataSet(this, type); _dataSets[type] = set; } return(set); }
ICacheSet ISetCollection.GetOrAddSet(ICacheSetSource source, Type type) { if (!_sets.TryGetValue(type, out var set)) { set = source.Create(this, type); _sets[type] = set; } return(set); }