public void Dispose() { _tokenizer.Dispose(); _tokenizer = null !; Current = null !; }
/// <summary> /// Releases all resources used by the <see cref="SerializedObjectReader" />. /// </summary> public void Dispose() { m_BinaryWriter.Dispose(); if (!m_LeaveOutputOpen) { m_BinaryStream.Dispose(); } m_Parser.Dispose(); m_Tokenizer.Dispose(); m_StreamReader.Dispose(); }
private static JsonData Parse(JsonReader reader) { if (_buffer == null) { _buffer = new StringBuilder(200); } var tokenizer = new JsonTokenizer(reader, _buffer); tokenizer.MoveNext(); var result = Visit(ref tokenizer); tokenizer.Dispose(); return(result); }
private TOut Deserialize <TOut>(JsonReader reader) { if (_buffer == null) { _buffer = new StringBuilder(200); } var converter = _converters.Get <TOut>(); var tokenizer = new JsonTokenizer(reader, _buffer); if (converter.IsPrimitive) { tokenizer.MoveNext(); } var result = converter.Deserialize(ref tokenizer); tokenizer.Dispose(); return(result); }
public void TearDown() { m_Tokenizer.Dispose(); }