Table of Contents

Method ThrowInvalidContextType

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

ThrowInvalidContextType(string, ContextType, params ContextType[])

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

protected void ThrowInvalidContextType(string methodName, ContextType actualContextType, params ContextType[] validContextTypes)

Parameters

methodName string

The name of the method.

actualContextType ContextType

The actual ContextType.

validContextTypes ContextType[]

The valid ContextTypes.