private void OnLineRead(object sender, ReadEventArgs e) { TwoEventArgs readedEventArgs = new TwoEventArgs(); readedEventArgs.firstData = e.oneLine; readedEventArgs.secondData = this; Read(this, readedEventArgs); }
void stream_Read(object sender, TwoEventArgs e) { string lineString = (string)e.firstData; Match match = Regex.Match(lineString, ">(.+),(.+),(.+)<"); if (match.Success) { LiveEventArgs liveEventArgs = new LiveEventArgs(); liveEventArgs.liveAddress = match.Groups[1].Value; liveEventArgs.liveCommunity = match.Groups[2].Value; liveEventArgs.liveUser = match.Groups[3].Value; LiveStarted(this, liveEventArgs); } }