예제 #1
0
        public void AddLocation(XmlLocationAttribute locationAttribute)
        {
            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Element))
            {
                ElementAllowedNames.AddRange(locationAttribute.AllowedNames);
                ElementAllowedNames.AddCaseVariantsForFirstChar();
                ElementAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Attribute))
            {
                AttributeAllowedNames.AddRange(locationAttribute.AllowedNames);
                AttributeAllowedNames.AddCaseVariantsForFirstChar();
                AttributeAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Value))
            {
                CouldBeValue = true;
            }
        }
예제 #2
0
파일: XmlLocation.cs 프로젝트: IIITanbI/1
        public void AddLocation(XmlLocationAttribute locationAttribute)
        {
            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Element))
            {
                ElementAllowedNames.AddRange(locationAttribute.AllowedNames);
                ElementAllowedNames.AddCaseVariantsForFirstChar();
                ElementAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Attribute))
            {
                AttributeAllowedNames.AddRange(locationAttribute.AllowedNames);
                AttributeAllowedNames.AddCaseVariantsForFirstChar();
                AttributeAllowedNames.Sort();
            }

            if (locationAttribute.LocationType.HasFlag(XmlLocationType.Value))
            {
                CouldBeValue = true;
            }
        }