Exemple #1
0
        public bool Check(XmlLocationType locationType, string name)
        {
            if (locationType.HasFlag(XmlLocationType.Element))
            {
                if (ElementAllowedNames.Contains(name))
                {
                    return(true);
                }
            }
            if (locationType.HasFlag(XmlLocationType.Attribute))
            {
                if (AttributeAllowedNames.Contains(name))
                {
                    return(true);
                }
            }

            return(false);
        }
Exemple #2
0
 public XmlLocationAttribute(XmlLocationType locationType, params string[] allowedNames)
 {
     LocationType = locationType;
     AllowedNames = allowedNames.ToList();
 }
Exemple #3
0
 public XmlLocationAttribute(XmlLocationType locationType, params string[] allowedNames)
 {
     LocationType = locationType;
     AllowedNames = allowedNames.ToList();
 }
Exemple #4
0
        public bool Check(XmlLocationType locationType, string name)
        {
            if (locationType.HasFlag(XmlLocationType.Element))
            {
                if (ElementAllowedNames.Contains(name))
                    return true;
            }
            if (locationType.HasFlag(XmlLocationType.Attribute))
            {
                if (AttributeAllowedNames.Contains(name))
                    return true;
            }

            return false;
        }