Class PortNotOpenException
A localizable exception for accessing a closed port.
Inheritance
System.Exception
System.SystemException
System.InvalidOperationException
PortNotOpenException
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetType()
System.Exception.Data
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
Namespace: Loehnert.Lisrt.Communication
Assembly: Loehnert.Lisrt.Communication.dll
Syntax
[Serializable]
public class PortNotOpenException : InvalidOperationException, ISerializable, _Exception, ITranslatableException, ITranslatableText
Constructors
PortNotOpenException(String)
Initializes a new instance of the PortNotOpenException class.
Declaration
public PortNotOpenException(string portName)
Parameters
Type | Name | Description |
---|---|---|
String | portName | Name for the port. |
Properties
Message
Gets the localized exception message.
Declaration
public override string Message { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
System.Exception.Message
MessageNumber
Gets the message number.
Declaration
public int MessageNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Equal with a ID.
PortName
Gets the name of the port.
Declaration
public string PortName { get; }
Property Value
Type | Description |
---|---|
String |
Methods
GetObjectData(SerializationInfo, StreamingContext)
Sets the System.Runtime.Serialization.SerializationInfo with information about the exception.
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. |
System.Runtime.Serialization.StreamingContext | context | The System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. |
Overrides
Translate(CultureInfo)
Translates the Message.
Declaration
public string Translate(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | culture | Culture for the returning message. |
Returns
Type | Description |
---|---|
String | Translated message text. |
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception