private void OnStreamChanged(string streamname) {
bool notifyChanged;
StreamInfo streamInfo;
string sectionName;
lock (this) {
if (_flags[Closed])
return;
streamInfo = (StreamInfo) ConfigStreamInfo.StreamInfos[streamname];
if (streamInfo == null || !streamInfo.IsMonitored)
return;
sectionName = streamInfo.SectionName;
}
if (sectionName == null) {
notifyChanged = true;
}
else {
FactoryRecord factoryRecord = FindFactoryRecord(sectionName, false);
notifyChanged = factoryRecord.RestartOnExternalChanges;
}
if (notifyChanged) {
_configRoot.FireConfigChanged(_configPath);
}
else {
_configRoot.ClearResult(this, sectionName, false);
}
}