System.Xml.Schema.XmlSchemaValidator.ProcessTokenizedType C# (CSharp) Méthode

ProcessTokenizedType() private méthode

private ProcessTokenizedType ( XmlTokenizedType ttype, string name, bool attrValue ) : void
ttype XmlTokenizedType
name string
attrValue bool
Résultat void
        private void ProcessTokenizedType(XmlTokenizedType ttype, string name, bool attrValue)
        {
            switch (ttype)
            {
                case XmlTokenizedType.ID:
                    if (ProcessIdentityConstraints)
                    {
                        if (FindId(name) != null)
                        {
                            if (attrValue)
                            {
                                _attrValid = false;
                            }
                            SendValidationEvent(SR.Sch_DupId, name);
                        }
                        else
                        {
                            if (_IDs == null)
                            { //ADD ID
                                _IDs = new Hashtable();
                            }
                            _IDs.Add(name, _context.LocalName);
                        }
                    }
                    break;
                case XmlTokenizedType.IDREF:
                    if (ProcessIdentityConstraints)
                    {
                        object p = FindId(name);
                        if (p == null)
                        { // add it to linked list to check it later
                            _idRefListHead = new IdRefNode(_idRefListHead, name, _positionInfo.LineNumber, _positionInfo.LinePosition);
                        }
                    }
                    break;
                case XmlTokenizedType.ENTITY:
                    ProcessEntity(name);
                    break;
                default:
                    break;
            }
        }