C# Class NATS.Client.Options

This class is used to setup all NATs client options.
Datei anzeigen Open project: nats-io/csnats Class Usage Examples

Public Properties

Property Type Description
AsyncErrorEventHandler EventHandler
ClosedEventHandler EventHandler
DisconnectedEventHandler EventHandler
ReconnectedEventHandler EventHandler
TLSRemoteCertificationValidationCallback RemoteCertificateValidationCallback

Public Methods

Method Description
AddCertificate ( X509Certificate2 certificate ) : void

Adds a certificate for use with a secure connection.

AddCertificate ( string fileName ) : void

Adds a certifcate for use with a secure connection.

ToString ( ) : string

Returns a string representation of the value of this Options instance.

Private Methods

Method Description
Options ( ) : System
Options ( Options o ) : System
appendEventHandler ( StringBuilder sb, String name, Delegate eh ) : void
processUrlString ( string url ) : void

Method Details

AddCertificate() public method

Adds a certificate for use with a secure connection.
public AddCertificate ( X509Certificate2 certificate ) : void
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate to add.
return void

AddCertificate() public method

Adds a certifcate for use with a secure connection.
public AddCertificate ( string fileName ) : void
fileName string Path to the certificate file to add.
return void

ToString() public method

Returns a string representation of the value of this Options instance.
public ToString ( ) : string
return string

Property Details

AsyncErrorEventHandler public_oe property

Represents the method that will handle an event raised when an error occurs out of band.
public EventHandler AsyncErrorEventHandler
return EventHandler

ClosedEventHandler public_oe property

Represents the method that will handle an event raised when a connection is closed.
public EventHandler ClosedEventHandler
return EventHandler

DisconnectedEventHandler public_oe property

Represents the method that will handle an event raised when a connection has been disconnected from a server.
public EventHandler DisconnectedEventHandler
return EventHandler

ReconnectedEventHandler public_oe property

Represents the method that will handle an event raised when a connection has reconnected to a server.
public EventHandler ReconnectedEventHandler
return EventHandler

TLSRemoteCertificationValidationCallback public_oe property

Overrides the default NATS RemoteCertificationValidationCallback.
The default callback simply checks if there were any protocol errors. Overriding this callback useful during testing, or accepting self signed certificates.
public RemoteCertificateValidationCallback TLSRemoteCertificationValidationCallback
return RemoteCertificateValidationCallback