internal bool Match(AccessorMapping mapping)
{
if (Elements != null && Elements.Length > 0)
{
if (!ElementsMatch(Elements, mapping.Elements))
{
return false;
}
if (Text == null)
{
return (mapping.Text == null);
}
}
if (Attribute != null)
{
if (mapping.Attribute == null)
return false;
return (Attribute.Name == mapping.Attribute.Name && Attribute.Namespace == mapping.Attribute.Namespace && Attribute.Form == mapping.Attribute.Form);
}
if (Text != null)
{
return (mapping.Text != null);
}
return (mapping.Accessor == null);
}
}