Table of Contents

Class ReplicaSetConfig

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

Represents the config of a replica set (as reported by one of the members of the replica set).

public sealed class ReplicaSetConfig : IEquatable<ReplicaSetConfig>
Inheritance
ReplicaSetConfig
Implements
Inherited Members

Constructors

ReplicaSetConfig(IEnumerable<EndPoint>, string, EndPoint, int?)

Initializes a new instance of the ReplicaSetConfig class.

public ReplicaSetConfig(IEnumerable<EndPoint> members, string name, EndPoint primary, int? version)

Parameters

members IEnumerable<EndPoint>

The members.

name string

The name.

primary EndPoint

The primary.

version int?

The version.

Properties

Empty

Gets an empty replica set config.

public static ReplicaSetConfig Empty { get; }

Property Value

ReplicaSetConfig

An empty replica set config.

Members

Gets the members.

public IReadOnlyList<EndPoint> Members { get; }

Property Value

IReadOnlyList<EndPoint>

The members.

Name

Gets the name of the replica set.

public string Name { get; }

Property Value

string

The name of the replica set.

Primary

Gets the primary.

public EndPoint Primary { get; }

Property Value

EndPoint

The primary.

Version

Gets the replica set config version.

public int? Version { get; }

Property Value

int?

The replica set config version.

Methods

Equals(ReplicaSetConfig)

public bool Equals(ReplicaSetConfig other)

Parameters

other ReplicaSetConfig

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int