internal bool IsLocalName(string localName) { if (dictionaryReader == null) { return(localName == reader.LocalName); } else { return(dictionaryReader.IsLocalName(localName)); } }
public void IsLocalName() { XmlDictionaryReader r = GetReader("<root/>"); r.Read(); Assert.IsTrue(r.IsLocalName("root"), "#1"); Assert.IsFalse(r.IsLocalName("foo"), "#2"); XmlDictionaryString ds; XmlDictionary dict = new XmlDictionary(); dict.Add("root"); dict.TryLookup("root", out ds); Assert.IsTrue(r.IsLocalName(ds), "#3"); dict.Add("foo"); dict.TryLookup("foo", out ds); Assert.IsFalse(r.IsLocalName(ds), "#4"); }