public StringExpressionSet Intersect(StringExpressionSet ses)
{
if (this.IsEmpty() || ses == null || ses.IsEmpty())
{
return(this.CreateNewEmpty());
}
this.CheckList();
ses.CheckList();
StringExpressionSet newEmpty = this.CreateNewEmpty();
for (int index1 = 0; index1 < this.m_list.Count; ++index1)
{
for (int index2 = 0; index2 < ses.m_list.Count; ++index2)
{
if (this.StringSubsetString((string)this.m_list[index1], (string)ses.m_list[index2], this.m_ignoreCase))
{
if (newEmpty.m_list == null)
{
newEmpty.m_list = new ArrayList();
}
newEmpty.AddSingleExpressionNoDuplicates((string)this.m_list[index1]);
}
else if (this.StringSubsetString((string)ses.m_list[index2], (string)this.m_list[index1], this.m_ignoreCase))
{
if (newEmpty.m_list == null)
{
newEmpty.m_list = new ArrayList();
}
newEmpty.AddSingleExpressionNoDuplicates((string)ses.m_list[index2]);
}
}
}
newEmpty.GenerateString();
return(newEmpty);
}