예제 #1
0
        public void TestGenericTestNull()
        {
            Flickr f = AuthInstance;

            UnknownResponse response = f.TestGeneric("flickr.test.null", null);

            Assert.IsNotNull(response, "UnknownResponse should not be null.");
            Assert.IsNotNull(response.ResponseXml, "ResponseXml should not be null.");
        }
예제 #2
0
        /// <summary>
        /// Отправка произвольной синхронной команды на сервер.
        /// </summary>
        /// <param name="command">команда</param>
        /// <returns>полученный ответ</returns>
        public Response ExecuteCommand(Command command)
        {
            Response response = new UnknownResponse(new byte[0]);

            if (sctpClient.IsConnected)
            {
                response = sctpClient.Send(command);
            }
            return(response);
        }
예제 #3
0
        public void TestGenericGroupSearch()
        {
            Flickr f = Instance;

            var parameters = new Dictionary <string, string>();

            parameters.Add("text", "Flowers");
            UnknownResponse response = f.TestGeneric("flickr.groups.search", parameters);

            Assert.IsNotNull(response, "UnknownResponse should not be null.");
            Assert.IsNotNull(response.ResponseXml, "ResponseXml should not be null.");
        }
예제 #4
0
        private void UnknownMethod(Connection connection, int requestNumber)
        {
            UnknownResponse response = new UnknownResponse(requestNumber);

            connection.Send(PrepareJson(response));
        }