private Exception FillOpenTrace(Exception t, string name, bool input)
{
lock (this)
{
foreach (KeyValuePair<IDisposable, Exception> ent in OpenFileHandles)
{
if (input && ent.Key is MockIndexInputWrapper && ((MockIndexInputWrapper)ent.Key).Name.Equals(name))
{
t = new Exception(ent.Value.Message, ent.Value);
break;
}
else if (!input && ent.Key is MockIndexOutputWrapper && ((MockIndexOutputWrapper)ent.Key).Name.Equals(name))
{
t = new Exception(ent.Value.Message, ent.Value);
break;
}
}
return t;
}
}