示例#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);
        }
示例#2
0
 public XmlLocationAttribute(XmlLocationType locationType, params string[] allowedNames)
 {
     LocationType = locationType;
     AllowedNames = allowedNames.ToList();
 }
示例#3
0
 public XmlLocationAttribute(XmlLocationType locationType, params string[] allowedNames)
 {
     LocationType = locationType;
     AllowedNames = allowedNames.ToList();
 }
示例#4
0
文件: XmlLocation.cs 项目: IIITanbI/1
        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;
        }