System.Xml.DTDReader.ReadEntityValueDecl C# (CSharp) Méthode

ReadEntityValueDecl() private méthode

private ReadEntityValueDecl ( DTDEntityDeclaration decl ) : void
decl DTDEntityDeclaration
Résultat void
		private void ReadEntityValueDecl (DTDEntityDeclaration decl)
		{
			SkipWhitespace ();
			// quotation char will be finally removed on unescaping
			int quoteChar = ReadChar ();
			if (quoteChar != '\'' && quoteChar != '"')
				throw NotWFError ("quotation char was expected.");
			ClearValueBuffer ();

			while (PeekChar () != quoteChar) {
				int ch = ReadChar ();
				switch (ch) {
				case '%':
					string name = ReadName ();
					Expect (';');
					if (decl.IsInternalSubset)
						throw NotWFError (String.Format ("Parameter entity is not allowed in internal subset entity '{0}'", name));
					valueBuffer.Append (GetPEValue (name));
					break;
				case -1:
					throw NotWFError ("unexpected end of stream.");
				default:
					if (this.normalization && XmlChar.IsInvalid (ch))
						throw NotWFError ("Invalid character was found in the entity declaration.");
					AppendValueChar (ch);
					break;
				}
			}
//			string value = Dereference (CreateValueString (), false);
			string value = CreateValueString ();
			ClearValueBuffer ();

			Expect (quoteChar);
			decl.LiteralEntityValue = value;
		}