Table of Contents

Method ThrowInvalidState

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

ThrowInvalidState(string, params BsonWriterState[])

Throws an InvalidOperationException when the method called is not valid for the current state.

protected void ThrowInvalidState(string methodName, params BsonWriterState[] validStates)

Parameters

methodName string

The name of the method.

validStates BsonWriterState[]

The valid states.