public IStreamParser GetParser(ColumnDefinition column) { var userId = column.SourceAccounts.First(); var key = new ParserKey(userId, StreamingType.User); IStreamParser parser; if (!LoadedParsers.TryGetValue(key, out parser)) { parser = StreamParser.Create(new StreamingConnection(ContextList.Contexts.First(c => c.UserId == userId) .Twitter.Streaming.GetUserStream())); LoadedParsers.Add(key, parser); } return(parser); }
protected void AddParser(IStreamParser parser, ParserKey key) { parser.FriendsReceived += Parser_FriendsReceived; LoadedParsers.Add(key, parser); }
public void InjectStream(ulong id, IStreamParser parser) { LoadedParsers.Add(new ParserKey(id, LinqToTwitter.StreamingType.User), parser); }