Beispiel #1
0
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                foreach (var kvp in LoadedParsers)
                {
                    kvp.Value.Dispose();
                }

                LoadedParsers.Clear();
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 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);
 }