internal SmbTree GetSmbTree(string share, string service)
{
lock (this)
{
SmbTree t;
if (share == null)
{
share = "IPC$";
}
/*for (IEnumeration e = trees.GetEnumerator(); e.MoveNext(); )
{
t = (SmbTree)e.Current;
if (t.Matches(share, service))
{
return t;
}
}*/
foreach (var e in Trees)
{
t = (SmbTree)e;
if (t.Matches(share, service))
{
return t;
}
}
t = new SmbTree(this, share, service);
Trees.Add(t);
return t;
}
}