Table of Contents

Class PortNotOpenException

Namespace
Loehnert.Lisrt.Communication
Assembly
Loehnert.Lisrt.Communication.dll

A localizable exception for accessing a closed port.

[Serializable]
public class PortNotOpenException : InvalidOperationException, ISerializable, _Exception, ITranslatableException, ITranslatableText
Inheritance
PortNotOpenException
Implements
Inherited Members

Constructors

PortNotOpenException(string)

Initializes a new instance of the PortNotOpenException class.

public PortNotOpenException(string portName)

Parameters

portName string

Name for the port.

Properties

Message

Gets the localized exception message.

public override string Message { get; }

Property Value

string

MessageNumber

Gets the message number.

public int MessageNumber { get; }

Property Value

int

Remarks

Equal with a ID.

PortName

Gets the name of the port.

public string PortName { get; }

Property Value

string

Methods

GetObjectData(SerializationInfo, StreamingContext)

Sets the System.Runtime.Serialization.SerializationInfo with information about the exception.

[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.

Translate(CultureInfo)

Translates the Message.

public string Translate(CultureInfo culture)

Parameters

culture CultureInfo

Culture for the returning message.

Returns

string

Translated message text.