private bool IsMatchOnXsiType(IXmlIdentity xmlIdentity) { var otherXsiType = xmlIdentity.XsiType; return(otherXsiType == XmlName.Empty || otherXsiType == XsiType); }
private bool IsMatch(IXmlIdentity xmlIdentity) { var name = xmlIdentity.Name; return(NameComparer.Equals(rootLocalName, name.LocalName) && (rootNamespaceUri == null || NameComparer.Equals(rootNamespaceUri, name.NamespaceUri))); }
private bool ShouldIgnoreAttributeNamespaceUri(IXmlIdentity xmlName) { var xmlNode = xmlName as IXmlNode; return(xmlNode != null && xmlNode.IsAttribute && 0 == (state & States.ConfiguredNamespaceUri)); }
internal static Exception CannotSetAttribute(IXmlIdentity identity) { var message = string.Format( "Cannot set attribute on node '{0}'.", identity.Name.ToString() ); return(new InvalidOperationException(message)); }
private bool IsMatchOnNamespaceUri(IXmlIdentity xmlIdentity) { var otherNamespaceUri = xmlIdentity.Name.NamespaceUri; if (Context.IsReservedNamespaceUri(otherNamespaceUri)) { return(NameComparer.Equals(namespaceUri, otherNamespaceUri)); } return(namespaceUri == null || ShouldIgnoreAttributeNamespaceUri(xmlIdentity) || NameComparer.Equals(namespaceUri, otherNamespaceUri)); }
protected virtual bool IsMatch(IXmlIdentity xmlIdentity) { return(NameComparer.Equals(localName, xmlIdentity.Name.LocalName) && IsMatchOnNamespaceUri(xmlIdentity) && IsMatchOnXsiType(xmlIdentity)); }
public bool TryGet(IXmlIdentity xmlName, out IXmlKnownType knownType) { return(IsMatch(xmlName) ? Try.Success(out knownType, this) : Try.Failure(out knownType)); }
public bool TryGet(IXmlIdentity xmlIdentity, out IXmlKnownType knownType) { return(itemsByXmlIdentity.TryGetValue(xmlIdentity, out knownType)); }
public void AddIdentify(IXmlIdentity xmlIdentity) { _xmlIdentities.Add(xmlIdentity); }