Mono.Xml.XmlTextWriter.ShiftStateContent C# (CSharp) Method

ShiftStateContent() private method

private ShiftStateContent ( string occured, bool allowAttribute ) : void
occured string
allowAttribute bool
return void
		void ShiftStateContent (string occured, bool allowAttribute)
		{
			switch (state) {
#if NET_2_0
			case WriteState.Error:
#endif
			case WriteState.Closed:
					throw StateError (occured);
			case WriteState.Prolog:
			case WriteState.Start:
				if (!allow_doc_fragment || is_document_entity)
					goto case WriteState.Closed;
				if (xmldecl_state == XmlDeclState.Auto)
					OutputAutoStartDocument ();
				CheckMixedContentState ();
				state = WriteState.Content;
				break;
			case WriteState.Attribute:
				if (allowAttribute)
					break;
				goto case WriteState.Closed;
			case WriteState.Element:
				CloseStartElement ();
				CheckMixedContentState ();
				break;
			case WriteState.Content:
				CheckMixedContentState ();
				break;
			}
		}