System.Xml.Schema.Preprocessor.ValidateIdAttribute C# (CSharp) Method

ValidateIdAttribute() private method

private ValidateIdAttribute ( XmlSchemaObject xso ) : void
xso XmlSchemaObject
return void
        private void ValidateIdAttribute(XmlSchemaObject xso) {
            if (xso.IdAttribute != null) {
                try {
                    xso.IdAttribute = NameTable.Add(XmlConvert.VerifyNCName(xso.IdAttribute));
                }
                catch(XmlException ex) {
                    SendValidationEvent(Res.Sch_InvalidIdAttribute, new string [] {ex.Message}, ex, xso);
                    return;
                }
                catch(ArgumentNullException) {
                    SendValidationEvent(Res.Sch_InvalidIdAttribute, Res.GetString(Res.Sch_NullValue), xso);
                    return;
                }
                try {
                    currentSchema.Ids.Add(xso.IdAttribute, xso);
                }
                catch (ArgumentException) {
                    SendValidationEvent(Res.Sch_DupIdAttribute, xso);
                }
            }
        }