Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

ArunHanu

@ArunHanu
About
Posts
7
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to write a generic code to make async call to Rest Service
    A ArunHanu

    Thanks a lot Nathan Minier and Richard Deeming for the solution. I will try to implement same solution and check

    C# tutorial mobile database sqlite debugging

  • How to write a generic code to make async call to Rest Service
    A ArunHanu

    Thank you Benjamin, Even making the change will create a strong bond with todoitem. My intention is to make it generalised so that I can make a single method for making calls for different URL's and get data for different class object As I have stated earlier I don't want to write the same code for a different URL request.

    C# tutorial mobile database sqlite debugging

  • How to write a generic code to make async call to Rest Service
    A ArunHanu

    I am creating a Xamarin app and I have to populate master data into sqlite DB on mobile. I am new to OOPS and Xamarin I have multiple requests to be made to get data from WebApi. The request I need to make is more than 50 calls to get info. Now, I need to write async generic code to achieve this. For example: I have to populate data for EmployeeMaster, Company Master etc.. My generic code should be able to identify which URL to call and Which object has to be returned. My normal code is as follows below The only varying data are RestUrl and TodoItem public async Task> RefreshDataAsync () { Items = new List (); RestUrl = "http://localhost:9054/TotoItem" var uri = new Uri (string.Format (RestUrl, string.Empty)); try { var response = await client.GetAsync (uri); if (response.IsSuccessStatusCode) { var content = await response.Content.ReadAsStringAsync (); Items = JsonConvert.DeserializeObject > (content); } } catch (Exception ex) { Debug.WriteLine (@" ERROR {0}", ex.Message); } return Items; }

    C# tutorial mobile database sqlite debugging

  • how to making async call to proxy webreference created from asmx webservice
    A ArunHanu

    Thank you, I was trying to consume ASMX web service as instructed in Xamarin ASMX Consuming an ASP.NET Web Service (ASMX) - Xamarin[^] I could make out the expected output was not as per the standards are given SOAP 1.1. So I have to modify the ASMX service Thank you again

    C# mobile tutorial

  • how to making async call to proxy webreference created from asmx webservice
    A ArunHanu

    As I am using ASMX I think I cant configure to return XML. I have JSON data returning. Is there any possibilities to consume JSON from webservice with an Async call. I am new to C# and Xamarin.

    C# mobile tutorial

  • how to making async call to proxy webreference created from asmx webservice
    A ArunHanu

    Thank you!! Do you mean I have to make change in Webservice ??

    C# mobile tutorial

  • how to making async call to proxy webreference created from asmx webservice
    A ArunHanu

    I have created proxy services by add web reference in my Xamarin.Droid project to access asmx webservice. Eg: I have a webservice for feature master when I make a direct request with URL "http://XX.XX.XXX.XXX/tabsaleswithdatasync.asmx/FeatureMaster" I am getting following info

    [{"msg":"","FeatureSlno":"2","Feature":"Fuel Used","DefaultValue":"","FeatureType":"B","Groups":"OverView","GroupOrder":"0","SubGroupOrder":"0","CategorySlno":"2","UtilisationSlno":"1","IconImagePath":"","LowerIsBetter":"0"},{"msg":"","FeatureSlno":"3","Feature":"Seating Capacity","DefaultValue":"","FeatureType":"B","Groups":"OverView","GroupOrder":"0","SubGroupOrder":"0","CategorySlno":"3","UtilisationSlno":"0","IconImagePath":"","LowerIsBetter":"0"}]

    I have written my method to get data EngageWebReference.TabSalesWithDataSync objProxy = new EngageWebReference.TabSalesWithDataSync(); objProxy.FeatureMasterCompleted += ObjProxy_FeatureMasterCompleted; objProxy.FeatureMasterAsync(); private void ObjProxy_CityMasterCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { // here I am getting XMLException as data at the root level is invalid. line 1 position 1. throw new NotImplementedException(); } Can anyone suggest how to make async call get the desired result into a variable eg: List res = new List res = GetFeatureMasterList();

    C# mobile tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups