// Add a stream to the list of streams to intercept.
//
// Parameters:
// alwaysIntercept - If true, then don't check whether the old stream and the new stream are the same.
// SaveAs() will set this to true if oldStreamname is actually referring to a stream
// on a remote machine.
internal void AddStreamname(string oldStreamname, string newStreamname, bool alwaysIntercept)
{
//
Debug.Assert(!String.IsNullOrEmpty(oldStreamname));
if (String.IsNullOrEmpty(oldStreamname))
{
return;
}
if (!alwaysIntercept && StringUtil.EqualsIgnoreCase(oldStreamname, newStreamname))
{
return;
}
if (_streams == null)
{
_streams = new HybridDictionary(true);
}
_streams[oldStreamname] = new StreamUpdate(newStreamname);
}