private void Init( XmlWriterSettings settings ) {
Debug.Assert( (int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI );
Debug.Assert( (int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN );
Debug.Assert( (int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME );
if ( elementPropertySearch == null ) {
//elementPropertySearch should be init last for the mutli thread safe situation.
attributePropertySearch = new TernaryTreeReadOnly(HtmlTernaryTree.htmlAttributes );
elementPropertySearch = new TernaryTreeReadOnly( HtmlTernaryTree.htmlElements );
}
elementScope = new ByteStack( StackIncrement );
uriEscapingBuffer = new byte[5];
currentElementProperties = ElementProperties.DEFAULT;
mediaType = settings.MediaType;
}