private void SafeNotifyListener(string dataId, string group, string content, string type, string md5, string encryptedDataKey, ManagerListenerWrap wrap) { var listener = wrap.Listener; ConfigResponse cr = new ConfigResponse(); cr.SetDataId(dataId); cr.SetGroup(group); cr.SetContent(content); cr.SetEncryptedDataKey(encryptedDataKey); ConfigFilterChainManager.DoFilter(null, cr); // after filter, such as decrypted value string contentTmp = cr.GetContent(); wrap.LastContent = content; wrap.LastCallMd5 = md5; // should pass the value after filter listener.ReceiveConfigInfo(contentTmp); }
public CacheData(ConfigFilterChainManager configFilterChainManager, LocalConfigInfoProcessor localConfigInfoProcessor, string name, string dataId, string group, string tenant) { if (string.IsNullOrEmpty(dataId)) { throw new ArgumentNullException(nameof(dataId)); } if (string.IsNullOrEmpty(group)) { throw new ArgumentNullException(nameof(group)); } _name = name; _configFilterChainManager = configFilterChainManager; _localConfigInfoProcessor = localConfigInfoProcessor; DataId = dataId; Group = group; Tenant = tenant; _listeners = new ConcurrentList <ManagerListenerWrap>(); IsInitializing = true; Content = LoadCacheContentFromDiskLocal(name, dataId, group, tenant); MD5 = GetMD5String(Content); }
public CacheDataTest() { _localConfigInfoProcessor = new LocalConfigInfoProcessor(AppDomain.CurrentDomain.BaseDirectory); _configFilterChainManager = new ConfigFilterChainManager(); }