public long GetMessageSize(int message) { if (m_CurrentState is DisconnectedState) { if (!Connect()) { return(-1); } } if (m_CurrentState is AuthorizationState) { if (!Authenticate()) { return(-2); } } RFC1939.ListCommand command = new RFC1939.ListCommand(m_Stream, message); if (IssueCommand(command)) { return(command.List[0]); } return(-3); }
public long[] ListMessages() { if (m_CurrentState is DisconnectedState) { if (!Connect()) { return new long[] { -1 } } ; } if (m_CurrentState is AuthorizationState) { if (!Authenticate()) { return new long[] { -2 } } ; } RFC1939.ListCommand command = new RFC1939.ListCommand(m_Stream); if (IssueCommand(command)) { return(command.List); } return(new long[] { -3 }); }