LayoutFarm.WebDom.CssCompundElementSelector.IsSameNameAndType C# (CSharp) Méthode

IsSameNameAndType() public méthode

public IsSameNameAndType ( CssElementSelector anotherSelector ) : bool
anotherSelector CssElementSelector
Résultat bool
        public override bool IsSameNameAndType(CssElementSelector anotherSelector)
        {
            if (anotherSelector == null)
            {
                return false;
            }
            if (anotherSelector == this)
            {
                return true;
            }
            //------------------------------
            CssCompundElementSelector another = anotherSelector as CssCompundElementSelector;
            if (another != null)
            {
                return this.OperatorName == another.OperatorName &&
                    this.LeftSelector.IsSameNameAndType(another.LeftSelector) &&
                    this.RightSelector.IsSameNameAndType(another.RightSelector);
            }
            return false;
        }
    }