Class TrieNameDecoder<TValue>
Represents a Trie-based name decoder that also provides a value.
public class TrieNameDecoder<TValue> : INameDecoder
Type Parameters
TValueThe type of the value.
- Inheritance
-
TrieNameDecoder<TValue>
- Implements
- Inherited Members
- Extension Methods
Constructors
TrieNameDecoder(BsonTrie<TValue>)
Initializes a new instance of the TrieNameDecoder<TValue> class.
public TrieNameDecoder(BsonTrie<TValue> trie)
Parameters
trieBsonTrie<TValue>The trie.
Properties
Found
Gets a value indicating whether this TrieNameDecoder<TValue> is found.
public bool Found { get; }
Property Value
- bool
trueif found; otherwise,false.
Value
Gets the value.
public TValue Value { get; }
Property Value
- TValue
The value.
Methods
Decode(BsonStream, UTF8Encoding)
Reads the name.
public string Decode(BsonStream stream, UTF8Encoding encoding)
Parameters
streamBsonStreamThe stream.
encodingUTF8EncodingThe encoding.
Returns
- string
The name.
Inform(string)
Informs the decoder of an already decoded name (so the decoder can change state if necessary).
public void Inform(string name)
Parameters
namestringThe name.