FlickrNet.Flickr.TestGeneric C# (CSharp) Method

TestGeneric() public method

Can be used to call unsupported methods in the Flickr API.
Use of this method is not supported. The way the FlickrNet API Library works may mean that some methods do not return an expected result when using this method.
public TestGeneric ( string method, NameValueCollection parameters ) : XmlElement[]
method string The method name, e.g. "flickr.test.null".
parameters NameValueCollection A list of parameters. Note, api_key is added by default and is not included. Can be null.
return XmlElement[]
        public XmlElement[] TestGeneric(string method, NameValueCollection parameters)
        {
            Hashtable _parameters = new Hashtable();
            if( parameters != null )
            {
                foreach(string key in parameters.AllKeys)
                {
                    _parameters.Add(key, parameters[key]);
                }
            }
            _parameters.Add("method", method);

            FlickrNet.Response response = GetResponseNoCache(_parameters);

            if( response.Status == ResponseStatus.OK )
            {
                return response.AllElements;
            }
            else
            {
                throw new FlickrException(response.Error);
            }
        }
Flickr