System.Xml.XmlWriter.WriteSurrogateCharEntity C# (CSharp) Method

WriteSurrogateCharEntity() public abstract method

public abstract WriteSurrogateCharEntity ( char lowChar, char highChar ) : void
lowChar char
highChar char
return void
        public abstract void WriteSurrogateCharEntity(char lowChar, char highChar);

Usage Example

Example #1
0
            internal void Replay(XmlWriter writer)
            {
                if (_singleStringValue != null)
                {
                    writer.WriteString(_singleStringValue);
                    return;
                }

                BufferChunk bufChunk;

                for (int i = _firstItem; i <= _lastItem; i++)
                {
                    Item item = _items[i];
                    switch (item.type)
                    {
                    case ItemType.EntityRef:
                        writer.WriteEntityRef((string)item.data);
                        break;

                    case ItemType.CharEntity:
                        writer.WriteCharEntity((char)item.data);
                        break;

                    case ItemType.SurrogateCharEntity:
                        char[] chars = (char[])item.data;
                        writer.WriteSurrogateCharEntity(chars[0], chars[1]);
                        break;

                    case ItemType.Whitespace:
                        writer.WriteWhitespace((string)item.data);
                        break;

                    case ItemType.String:
                        writer.WriteString((string)item.data);
                        break;

                    case ItemType.StringChars:
                        bufChunk = (BufferChunk)item.data;
                        writer.WriteChars(bufChunk.buffer, bufChunk.index, bufChunk.count);
                        break;

                    case ItemType.Raw:
                        writer.WriteRaw((string)item.data);
                        break;

                    case ItemType.RawChars:
                        bufChunk = (BufferChunk)item.data;
                        writer.WriteChars(bufChunk.buffer, bufChunk.index, bufChunk.count);
                        break;

                    case ItemType.ValueString:
                        writer.WriteValue((string)item.data);
                        break;

                    default:
                        Debug.Fail("Unexpected ItemType value.");
                        break;
                    }
                }
            }
All Usage Examples Of System.Xml.XmlWriter::WriteSurrogateCharEntity