Table of Contents

Class TrieNameDecoder<TValue>

Namespace
MongoDB.Bson.IO
Assembly
MongoDB.Bson.dll

Represents a Trie-based name decoder that also provides a value.

public class TrieNameDecoder<TValue> : INameDecoder

Type Parameters

TValue

The 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

trie BsonTrie<TValue>

The trie.

Properties

Found

Gets a value indicating whether this TrieNameDecoder<TValue> is found.

public bool Found { get; }

Property Value

bool

true if 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

stream BsonStream

The stream.

encoding UTF8Encoding

The 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

name string

The name.