public XmlQualifiedNameTest Intersect(XmlQualifiedNameTest other)
{
// Namespace
// this\other ~y * y
// ~x x=y ? this|other : null this x!=y ? other : null
// * other this|other other
// x x!=y ? this : null this x=y ? this|other : null
XmlQualifiedNameTest namespaceFrom = IsNamespaceSubsetOf(other) ? this : other.IsNamespaceSubsetOf(this) ? other : null;
XmlQualifiedNameTest nameFrom = IsNameSubsetOf(other) ? this : other.IsNameSubsetOf(this) ? other : null;
if ((object)namespaceFrom == (object)nameFrom)
{
return(namespaceFrom);
}
else if (namespaceFrom == null || nameFrom == null)
{
return(null);
}
else
{
return(new XmlQualifiedNameTest(nameFrom.Name, namespaceFrom.Namespace, namespaceFrom.ExcludeNamespace));
}
}