Table of Contents

Class PipelineDefinition<TInput, TOutput>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Base class for a pipeline.

public abstract class PipelineDefinition<TInput, TOutput>

Type Parameters

TInput

The type of the input.

TOutput

The type of the output.

Inheritance
PipelineDefinition<TInput, TOutput>
Derived
Inherited Members
Extension Methods

Properties

OutputSerializer

Gets the output serializer.

public abstract IBsonSerializer<TOutput> OutputSerializer { get; }

Property Value

IBsonSerializer<TOutput>

Stages

Gets the stages.

public abstract IEnumerable<IPipelineStageDefinition> Stages { get; }

Property Value

IEnumerable<IPipelineStageDefinition>

Methods

Create(params BsonDocument[])

Creates a pipeline.

public static PipelineDefinition<TInput, TOutput> Create(params BsonDocument[] stages)

Parameters

stages BsonDocument[]

The stages.

Returns

PipelineDefinition<TInput, TOutput>

A PipelineDefinition<TInput, TOutput>.

Create(IEnumerable<BsonDocument>, IBsonSerializer<TOutput>)

Creates a pipeline.

public static PipelineDefinition<TInput, TOutput> Create(IEnumerable<BsonDocument> stages, IBsonSerializer<TOutput> outputSerializer = null)

Parameters

stages IEnumerable<BsonDocument>

The stages.

outputSerializer IBsonSerializer<TOutput>

The output serializer.

Returns

PipelineDefinition<TInput, TOutput>

A PipelineDefinition<TInput, TOutput>.

Create(IEnumerable<IPipelineStageDefinition>, IBsonSerializer<TOutput>)

Creates a pipeline.

public static PipelineDefinition<TInput, TOutput> Create(IEnumerable<IPipelineStageDefinition> stages, IBsonSerializer<TOutput> outputSerializer = null)

Parameters

stages IEnumerable<IPipelineStageDefinition>

The stages.

outputSerializer IBsonSerializer<TOutput>

The output serializer.

Returns

PipelineDefinition<TInput, TOutput>

A PipelineDefinition<TInput, TOutput>.

Create(IEnumerable<string>, IBsonSerializer<TOutput>)

Creates a pipeline.

public static PipelineDefinition<TInput, TOutput> Create(IEnumerable<string> stages, IBsonSerializer<TOutput> outputSerializer = null)

Parameters

stages IEnumerable<string>

The stages.

outputSerializer IBsonSerializer<TOutput>

The output serializer.

Returns

PipelineDefinition<TInput, TOutput>

A PipelineDefinition<TInput, TOutput>.

Create(params string[])

Creates a pipeline.

public static PipelineDefinition<TInput, TOutput> Create(params string[] stages)

Parameters

stages string[]

The stages.

Returns

PipelineDefinition<TInput, TOutput>

A PipelineDefinition<TInput, TOutput>.

Render(IBsonSerializer<TInput>, IBsonSerializerRegistry)

Renders the pipeline.

public virtual RenderedPipelineDefinition<TOutput> Render(IBsonSerializer<TInput> inputSerializer, IBsonSerializerRegistry serializerRegistry)

Parameters

inputSerializer IBsonSerializer<TInput>

The input serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

Returns

RenderedPipelineDefinition<TOutput>

A RenderedPipelineDefinition<TOutput>

Render(IBsonSerializer<TInput>, IBsonSerializerRegistry, LinqProvider)

Renders the pipeline.

public abstract RenderedPipelineDefinition<TOutput> Render(IBsonSerializer<TInput> inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)

Parameters

inputSerializer IBsonSerializer<TInput>

The input serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

linqProvider LinqProvider

The LINQ provider.

Returns

RenderedPipelineDefinition<TOutput>

A RenderedPipelineDefinition<TOutput>

ToString()

public override string ToString()

Returns

string

ToString(IBsonSerializer<TInput>, IBsonSerializerRegistry)

Returns a string that represents this instance.

public string ToString(IBsonSerializer<TInput> inputSerializer, IBsonSerializerRegistry serializerRegistry)

Parameters

inputSerializer IBsonSerializer<TInput>

The input serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

Returns

string

A string that represents this instance.

ToString(IBsonSerializer<TInput>, IBsonSerializerRegistry, LinqProvider)

Returns a string that represents this instance.

public string ToString(IBsonSerializer<TInput> inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)

Parameters

inputSerializer IBsonSerializer<TInput>

The input serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

linqProvider LinqProvider

The LINQ provider.

Returns

string

A string that represents this instance.

ToString(LinqProvider)

Returns a string that represents this instance.

public string ToString(LinqProvider linqProvider)

Parameters

linqProvider LinqProvider

The LINQ provider.

Returns

string

A string that represents this instance.

Operators

implicit operator PipelineDefinition<TInput, TOutput>(BsonDocument[])

Performs an implicit conversion from BsonDocument[] to PipelineDefinition<TInput, TOutput>.

public static implicit operator PipelineDefinition<TInput, TOutput>(BsonDocument[] stages)

Parameters

stages BsonDocument[]

The stages.

Returns

PipelineDefinition<TInput, TOutput>

The result of the conversion.

implicit operator PipelineDefinition<TInput, TOutput>(IPipelineStageDefinition[])

Performs an implicit conversion from IPipelineStageDefinition[] to PipelineDefinition<TInput, TOutput>.

public static implicit operator PipelineDefinition<TInput, TOutput>(IPipelineStageDefinition[] stages)

Parameters

stages IPipelineStageDefinition[]

The stages.

Returns

PipelineDefinition<TInput, TOutput>

The result of the conversion.

implicit operator PipelineDefinition<TInput, TOutput>(List<BsonDocument>)

Performs an implicit conversion from List<T> to PipelineDefinition<TInput, TOutput>.

public static implicit operator PipelineDefinition<TInput, TOutput>(List<BsonDocument> stages)

Parameters

stages List<BsonDocument>

The stages.

Returns

PipelineDefinition<TInput, TOutput>

The result of the conversion.

implicit operator PipelineDefinition<TInput, TOutput>(List<IPipelineStageDefinition>)

Performs an implicit conversion from List<T> to PipelineDefinition<TInput, TOutput>.

public static implicit operator PipelineDefinition<TInput, TOutput>(List<IPipelineStageDefinition> stages)

Parameters

stages List<IPipelineStageDefinition>

The stages.

Returns

PipelineDefinition<TInput, TOutput>

The result of the conversion.