Table of Contents

Class ServerApi

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Core.dll

Represents a server API.

public class ServerApi : IEquatable<ServerApi>
Inheritance
ServerApi
Implements
Inherited Members

Constructors

ServerApi(ServerApiVersion, Optional<bool?>, Optional<bool?>)

Initializes a new instance of the ServerApi class.

public ServerApi(ServerApiVersion version, Optional<bool?> strict = default, Optional<bool?> deprecationErrors = default)

Parameters

version ServerApiVersion

The server API version.

strict Optional<bool?>

The flag for strict server API version enforcement.

deprecationErrors Optional<bool?>

The flag for treating deprecated server APIs as errors.

Properties

DeprecationErrors

Gets the deprecation errors flag.

public bool? DeprecationErrors { get; }

Property Value

bool?

Strict

Gets the strict flag.

public bool? Strict { get; }

Property Value

bool?

Version

Gets the server API version.

public ServerApiVersion Version { get; }

Property Value

ServerApiVersion

Methods

Equals(ServerApi)

public bool Equals(ServerApi other)

Parameters

other ServerApi

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ServerApi, ServerApi)

Returns true if the two values are equal.

public static bool operator ==(ServerApi lhs, ServerApi rhs)

Parameters

lhs ServerApi

The left hand side.

rhs ServerApi

The right hand side

Returns

bool

True if the two values are equal.

operator !=(ServerApi, ServerApi)

Returns true if the two values are not equal.

public static bool operator !=(ServerApi lhs, ServerApi rhs)

Parameters

lhs ServerApi

The left hand side.

rhs ServerApi

The right hand side

Returns

bool

True if the two values are not equal.