private void ProcessResponseContent(string content) { if (content == null) { // StreamReader may emit a null if the stream has been closed; there's nothing to // be done at this level in that case return; } if (string.IsNullOrEmpty(content.Trim())) { DispatchEvent(); } else if (EventParser.IsComment(content)) { OnCommentReceived(new CommentReceivedEventArgs(content)); } else if (EventParser.ContainsField(content)) { var field = EventParser.GetFieldFromLine(content); ProcessField(field.Key, field.Value); } else { ProcessField(content.Trim(), string.Empty); } }
private void ProcessResponseContent(string content) { if (string.IsNullOrEmpty(content.Trim())) { DispatchEvent(); } else if (EventParser.IsComment(content)) { OnCommentReceived(new CommentReceivedEventArgs(content)); } else if (EventParser.ContainsField(content)) { var field = EventParser.GetFieldFromLine(content); ProcessField(field.Key, field.Value); } else { ProcessField(content.Trim(), string.Empty); } }