Class PortNotOpenException
- Namespace
- Loehnert.Lisrt.Communication
- Assembly
- Loehnert.Lisrt.Communication.dll
A localizable exception for accessing a closed port.
[SuppressMessage("Design", "RCS1194:Implement exception constructors.", Justification = "The constructor with InnerException is not required.")]
[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
portNamestringName for the port.
Properties
Message
Gets the localized exception message.
public override string Message { get; }
Property Value
MessageNumber
Gets the message number.
public int MessageNumber { get; }
Property Value
Remarks
Equal with a ID.
PortName
Gets the name of the port.
public string PortName { get; }
Property Value
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
infoSerializationInfoThe System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.
contextStreamingContextThe System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.
Translate(CultureInfo)
Translates the Message.
public string Translate(CultureInfo culture)
Parameters
cultureCultureInfoCulture for the returning message.
Returns
- string
Translated message text.