示例#1
0
        internal static void VerifyResponse(FtpResponse response, uint[] expectedReplyCodes)
        {
            foreach (uint expectedReplyCode in expectedReplyCodes)
            {
                if (expectedReplyCode == response.ReplyCode)
                {
                    return;
                }
            }

            throw new Exception(String.Format(
                                    "FTP: Expected reply code was {0}, however the server replied: {1}",
                                    JoinRetryCodes(expectedReplyCodes),
                                    response.ToString().Trim()));
        }
示例#2
0
        internal static void VerifyResponse(FtpResponse response, uint[] expectedReplyCodes)
        {
            foreach (uint expectedReplyCode in expectedReplyCodes)
            {
                if (expectedReplyCode == response.ReplyCode)
                {
                    return;
                }
            }

            throw new Exception(String.Format(
                "FTP: Expected reply code was {0}, however the server replied: {1}",
                JoinRetryCodes(expectedReplyCodes),
                response.ToString().Trim()));
        }