System.Xml.XmlConvert.CreateInvalidCharException C# (CSharp) Method

CreateInvalidCharException() static private method

static private CreateInvalidCharException ( char invChar, char nextChar ) : Exception
invChar char
nextChar char
return System.Exception
        internal static Exception CreateInvalidCharException(char invChar, char nextChar)
        {
            return CreateInvalidCharException(invChar, nextChar, ExceptionType.ArgumentException);
        }

Same methods

XmlConvert::CreateInvalidCharException ( char invChar, char nextChar, ExceptionType exceptionType ) : Exception
XmlConvert::CreateInvalidCharException ( char data, int length, int invCharPos ) : Exception
XmlConvert::CreateInvalidCharException ( char data, int length, int invCharPos, ExceptionType exceptionType ) : Exception
XmlConvert::CreateInvalidCharException ( string data, int invCharPos ) : Exception
XmlConvert::CreateInvalidCharException ( string data, int invCharPos, ExceptionType exceptionType ) : Exception

Usage Example

示例#1
0
 public override Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset)
 {
     if (_checkNames)
     {
         ValidateQName(name);
     }
     if (_checkValues)
     {
         if (pubid != null)
         {
             int i;
             if ((i = _xmlCharType.IsPublicId(pubid)) >= 0)
             {
                 throw XmlConvert.CreateInvalidCharException(pubid, i);
             }
         }
         if (sysid != null)
         {
             CheckCharacters(sysid);
         }
         if (subset != null)
         {
             CheckCharacters(subset);
         }
     }
     if (_replaceNewLines)
     {
         sysid  = ReplaceNewLines(sysid);
         pubid  = ReplaceNewLines(pubid);
         subset = ReplaceNewLines(subset);
     }
     return(writer.WriteDocTypeAsync(name, pubid, sysid, subset));
 }
All Usage Examples Of System.Xml.XmlConvert::CreateInvalidCharException