ios - convert Stream object to an ArrayList C# -


let me explain whole scenario first. code on ios side.

    nsmutablearray * myarr= [[nsmutablearray alloc]init]; nsstring *str1=@"hello"; nsstring *str2=@"waleed"; nsstring *str3=@"whatsup"; nsdata *mydata=[str1 datausingencoding:nsutf8stringencoding]; nsdata *mydata2=[str2 datausingencoding:nsutf8stringencoding]; nsdata *mydata3=[str3 datausingencoding:nsutf8stringencoding]; [myarr addobject:mydata]; [myarr addobject:mydata2]; [myarr addobject:mydata3]; nsdata *bigdata = [nskeyedarchiver archiveddatawithrootobject:myarr]; nsstring *urlstring = @"http://192.168.249.1/service/getemployees.svc/arrayupload/";  nsmutableurlrequest *request = [[nsmutableurlrequest alloc] init]; [request seturl:[nsurl urlwithstring:urlstring]]; [request sethttpmethod:@"post"]; nsmutabledata *postbody = [nsmutabledata data];  //add image data post [postbody appenddata:[nsdata datawithdata:bigdata]];  [request sethttpbody: postbody];  // connect web nsdata *respdata = [nsurlconnection sendsynchronousrequest:request returningresponse:nil error:nil]; nsstring *respstr = [[nsstring alloc] initwithdata:respdata encoding:nsutf8stringencoding]; 

this code takes 3 different strings, converts of them in nsdata, put nsdata objects them them in mutablearray , converts mutablearray nsdata in order post through wcf web sevice.

now on c# have funtion in nsdata (converted nsmutablearray) received in stream object

public string arrayupload(stream stream)     {     //code here     } 

now stream object have nsdata of array. want extract array , strings 1 one. can please?


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -