# Class PgOutputReplicationOptions

Namespace
  Npgsql.Replication.PgOutput

Assembly
  Npgsql.dll

Options to be passed to the pgoutput plugin

    public class PgOutputReplicationOptions : IEquatable<PgOutputReplicationOptions>

Inheritance
  object
  PgOutputReplicationOptions

Implements
  IEquatable<PgOutputReplicationOptions>

Inherited Members
  object.Equals(object, object)
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### PgOutputReplicationOptions(IEnumerable<string>, ulong, bool?, bool?, bool?, bool?)

Creates a new instance of PgOutputReplicationOptions.

    public PgOutputReplicationOptions(IEnumerable<string> publicationNames, ulong protocolVersion, bool? binary = null, bool? streaming = null, bool? messages = null, bool? twoPhase = null)

#### Parameters

`publicationNames` IEnumerable<string>

  The publication names to include into the stream

`protocolVersion` ulong

  The version of the logical streaming replication protocol

`binary` bool?

  Send values in binary representation

`streaming` bool?

  Enable streaming of in-progress transactions

`messages` bool?

  Write logical decoding messages into the replication stream

`twoPhase` bool?

  Enable streaming of prepared transactions

### PgOutputReplicationOptions(string, ulong, bool?, bool?, bool?, bool?)

Creates a new instance of PgOutputReplicationOptions.

    public PgOutputReplicationOptions(string publicationName, ulong protocolVersion, bool? binary = null, bool? streaming = null, bool? messages = null, bool? twoPhase = null)

#### Parameters

`publicationName` string

  The publication names to include into the stream

`protocolVersion` ulong

  The version of the logical streaming replication protocol

`binary` bool?

  Send values in binary representation

`streaming` bool?

  Enable streaming of in-progress transactions

`messages` bool?

  Write logical decoding messages into the replication stream

`twoPhase` bool?

  Enable streaming of prepared transactions

## Properties

### Binary

Send values in binary representation

    public bool? Binary { get; }

#### Property Value

bool?

#### Remarks

This works in PostgreSQL versions 14+

### Messages

Write logical decoding messages into the replication stream

    public bool? Messages { get; }

#### Property Value

bool?

#### Remarks

This works in PostgreSQL versions 14+

### ProtocolVersion

The version of the Logical Streaming Replication Protocol

    public ulong ProtocolVersion { get; }

#### Property Value

ulong

### PublicationNames

The publication names to stream

    public List<string> PublicationNames { get; }

#### Property Value

List<string>

### Streaming

Enable streaming of in-progress transactions

    public bool? Streaming { get; }

#### Property Value

bool?

#### Remarks

This works as of logical streaming replication protocol version 2 (PostgreSQL 14+)

### TwoPhase

Enable streaming of prepared transactions

    public bool? TwoPhase { get; }

#### Property Value

bool?

#### Remarks

This works in PostgreSQL versions 15+

## Methods

### Equals(PgOutputReplicationOptions?)

Indicates whether the current object is equal to another object of the same type.

    public bool Equals(PgOutputReplicationOptions? other)

#### Parameters

`other` PgOutputReplicationOptions

  An object to compare with this object.

#### Returns

bool

  true if the current object is equal to the `other` parameter; otherwise, false.

### Equals(object?)

Determines whether the specified object is equal to the current object.

    public override bool Equals(object? obj)

#### Parameters

`obj` object

  The object to compare with the current object.

#### Returns

bool

  true if the specified object is equal to the current object; otherwise, false.

### GetHashCode()

Serves as the default hash function.

    public override int GetHashCode()

#### Returns

int

  A hash code for the current object.