System.Xml.Xsl.XmlQualifiedNameTest.IsNameSubsetOf C# (CSharp) Method

IsNameSubsetOf() private method

private IsNameSubsetOf ( XmlQualifiedNameTest other ) : bool
other XmlQualifiedNameTest
return bool
        private bool IsNameSubsetOf(XmlQualifiedNameTest other) {
            return other.IsNameWildcard || this.Name == other.Name;
        }

Usage Example

        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));
            }
        }
All Usage Examples Of System.Xml.Xsl.XmlQualifiedNameTest::IsNameSubsetOf