예제 #1
0
        private TcpConnectorException(string message, Exception innerException, TcpConnectorAction operation, TcpConnectorErrorType errorType)
            : base(message, innerException)
        {
            if (operation < TcpConnectorAction.Connecting || operation > TcpConnectorAction.Receive)
            {
                throw new InvalidEnumArgumentException(nameof(operation), (int)operation, typeof(TcpConnectorAction));
            }
            if (errorType < TcpConnectorErrorType.Unknown || errorType > TcpConnectorErrorType.WrongPacket)
            {
                throw new InvalidEnumArgumentException(nameof(errorType), (int)errorType, typeof(TcpConnectorErrorType));
            }

            _action    = operation;
            _errorType = errorType;
        }
예제 #2
0
 public TcpConnectorException(TcpConnectorAction operation, TcpConnectorErrorType errorType, string message, Exception innerException)
     : this(message, innerException, operation, errorType)
 {
 }
예제 #3
0
 public TcpConnectorException(TcpConnectorAction operation, TcpConnectorErrorType errorType)
     : this(string.Empty, null, operation, errorType)
 {
 }
예제 #4
0
 protected TcpConnectorException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _action    = (TcpConnectorAction)info.GetInt32(nameof(Action));
     _errorType = (TcpConnectorErrorType)info.GetInt32(nameof(ErrorType));
 }