Find Jobs
Hire Freelancers

Convert C# class to iPhone Objective C class

$5-10 USD

En curso
Publicado hace más de 12 años

$5-10 USD

Pagado a la entrega
Convert a C# class (see details) to an iPhone objective C class. Please stay as close to this C# class as possible, including using Dictionary. Here is the C# usage of the class. I need an iPhone/Objective C class (NSObject class) which can be used similar to this: C# usage: CommDB db = new CommDB(); [login to view URL] ="someCommand"; [login to view URL]("key","value"); [login to view URL]("key2", "value2"); string response = [login to view URL](); ## Deliverables See the attached file for a better view of the C# class. class CommDB //database communication object { //public properties public string cmd { get; set; } public Dictionary d { get; set; } //this could be added as a variable for play on a different server private const string url = "[login to view URL]"; public CommDB() { d = new Dictionary(); } public string SendPost() { string post = "cmd=" + cmd; //add all name value pairs to post string foreach (KeyValuePair dictionary in d) { post += "&" + [login to view URL] + "=" + [login to view URL]; } string response = null; try { //Our postvars byte[] buffer = [login to view URL](post); //debug //[login to view URL]("POST: {0}", post); //Initialisation, we use localhost, change if appliable HttpWebRequest WebReq = (HttpWebRequest)[login to view URL](url); //Our method is post, otherwise the buffer (postvars) would be useless [login to view URL] = "POST"; //We use form contentType, for the postvars. [login to view URL] = "application/x-www-form-urlencoded"; //The length of the buffer (postvars) is used as contentlength. [login to view URL] = [login to view URL]; //We open a stream for writing the postvars Stream PostData = [login to view URL](); //Now we write, and afterwards, we close. Closing is always important! [login to view URL](buffer, 0, [login to view URL]); [login to view URL](); //Get the response handle, we have no true response yet! HttpWebResponse WebResp = (HttpWebResponse)[login to view URL](); //Let's show some information about the response //[login to view URL]([login to view URL]); //[login to view URL]([login to view URL]); //Now, we read the response (the string), and output it. Stream Answer = [login to view URL](); StreamReader _Answer = new StreamReader(Answer); response = [login to view URL](); } catch (Exception ex) { [login to view URL]([login to view URL]); } return [login to view URL](); } }
ID del proyecto: 3722322

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 12 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$7 USD en 2 días
5,0 (14 comentarios)
4,1
4,1
2 freelancers están ofertando un promedio de $7 USD por este trabajo
Avatar del usuario
See private message.
$7 USD en 2 días
4,9 (23 comentarios)
4,6
4,6

Sobre este cliente

Bandera de UNITED STATES
United States
5,0
48
Miembro desde mar 15, 2007

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.