public override string ResponseHandle() { List <String> invalids = new List <string>(); List <String> valids = new List <string>(); if (this.failure > 0) { for (int row = 0; row < this.results.Count; row++) { if (!String.IsNullOrEmpty(this.results[row].error)) { invalids.Add(Devices[row]); } } } valids = Devices.Where(a => !invalids.Any(m => m == a)).ToList(); ResponseBack response = new ResponseBack() { Type = Type, Success = valids, Fail = invalids }; return(MessageUtility.JsonToString(response)); //return JsonConvert.SerializeObject(response); //return base.ResponseHandle(); }
public override string ResponseHandle() { ResponseBack response = new ResponseBack() { Type = Type, Success = valids, Fail = invalids }; return(MessageUtility.JsonToString(response)); //return JsonConvert.SerializeObject(response); }