Lucene.Net.Store.MockDirectoryWrapper.FillOpenTrace C# (CSharp) Method

FillOpenTrace() private method

private FillOpenTrace ( Exception t, string name, bool input ) : Exception
t Exception
name string
input bool
return Exception
        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;
            }
        }