Mono.Xml.XmlTextWriter.WriteEndElementCore C# (CSharp) Méthode

WriteEndElementCore() private méthode

private WriteEndElementCore ( bool full ) : void
full bool
Résultat void
		void WriteEndElementCore (bool full)
		{
#if NET_2_0
			if (state == WriteState.Error || state == WriteState.Closed)
#else
			if (state == WriteState.Closed)
#endif
				throw StateError ("EndElement");
			if (open_count == 0)
				throw InvalidOperation ("There is no more open element.");

			// bool isEmpty = state != WriteState.Content;

			CloseStartElementCore ();

			nsmanager.PopScope ();

			if (state == WriteState.Element) {
				if (full)
					writer.Write ('>');
				else
					writer.Write (" />");
			}

			if (full || state == WriteState.Content)
				WriteIndentEndElement ();

			XmlNodeInfo info = elements [--open_count];

			if (full || state == WriteState.Content) {
				writer.Write ("</");
				if (info.Prefix.Length > 0) {
					writer.Write (info.Prefix);
					writer.Write (':');
				}
				writer.Write (info.LocalName);
				writer.Write ('>');
			}

			state = WriteState.Content;
			if (open_count == 0)
				node_state = XmlNodeType.EndElement;
		}