private MIAsyncOutput ParseAsyncOutput(string response, int beginIndex, out int endIndex) { MIAsyncOutputClass asyncClass = ParseAsyncOutputClass(response, beginIndex, out endIndex); List <MIResult> results = new List <MIResult>(); while (endIndex != response.Length) { if (response[endIndex] != ',') { break; } results.Add(ParseResult(response, endIndex + 1, out endIndex)); } return(new MIAsyncOutput(asyncClass, results.ToArray())); }
private MIAsyncOutputClass ParseAsyncOutputClass(string response, int beginIndex, out int endIndex) { endIndex = beginIndex; while (endIndex < response.Length) { if (response[endIndex] == ',') { break; } endIndex++; } string strClass = response.Substring(beginIndex, endIndex - beginIndex); if (strClass == "stopped") { return(MIAsyncOutputClass.Stopped); } return(MIAsyncOutputClass.Others(strClass)); }