Table of Contents

Method Subscribe

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

Subscribe<TEvent>(Action<TEvent>)

Subscribes to events of type TEvent.

public ClusterBuilder Subscribe<TEvent>(Action<TEvent> handler)

Parameters

handler Action<TEvent>

The handler.

Returns

ClusterBuilder

A reconfigured cluster builder.

Type Parameters

TEvent

The type of the event.

Subscribe(IEventSubscriber)

Subscribes the specified subscriber.

public ClusterBuilder Subscribe(IEventSubscriber subscriber)

Parameters

subscriber IEventSubscriber

The subscriber.

Returns

ClusterBuilder

A reconfigured cluster builder.