示例#1
0
        public Core()
        {
            // Base de datos
            IEmbeddedConfiguration config = Db4oEmbedded.NewConfiguration();
            config.Common.UpdateDepth = 3;  // Para almancenar objetos anidados (listas, etc.) en DB.
            //config.Common.StringEncoding = StringEncodings.Utf8();   // Esto ahorra mucho espacio pero genera dificultades
            db = Db4oEmbedded.OpenFile(config, dbName);

            words = new Dictionary<string, int>();
            InitWords();

            TA = new TweetAnalyzer(db, this);

            mediumBlockTimer = new System.Timers.Timer();
            mediumBlockTimer.Interval = TS_medium.TotalMilliseconds;
            mediumBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnMediumBlockTimer);

            longBlockTimer = new System.Timers.Timer();
            longBlockTimer.Interval = TS_long.TotalMilliseconds;
            longBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnLongBlockTimer);

            shortBlockTimer = new System.Timers.Timer();
            shortBlockTimer.Interval = TS_short.TotalMilliseconds;
            shortBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnShortBlockTimer);

            quickBlockTimer = new System.Timers.Timer();
            quickBlockTimer.Interval = TS_quick.TotalMilliseconds;
            quickBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnQuickBlockTimer);
        }
示例#2
0
        public Core()
        {
            // Base de datos
            IEmbeddedConfiguration config = Db4oEmbedded.NewConfiguration();

            config.Common.UpdateDepth = 3;  // Para almancenar objetos anidados (listas, etc.) en DB.
            //config.Common.StringEncoding = StringEncodings.Utf8();   // Esto ahorra mucho espacio pero genera dificultades
            db = Db4oEmbedded.OpenFile(config, dbName);

            words = new Dictionary <string, int>();
            InitWords();

            TA = new TweetAnalyzer(db, this);

            mediumBlockTimer          = new System.Timers.Timer();
            mediumBlockTimer.Interval = TS_medium.TotalMilliseconds;
            mediumBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnMediumBlockTimer);

            longBlockTimer          = new System.Timers.Timer();
            longBlockTimer.Interval = TS_long.TotalMilliseconds;
            longBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnLongBlockTimer);

            shortBlockTimer          = new System.Timers.Timer();
            shortBlockTimer.Interval = TS_short.TotalMilliseconds;
            shortBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnShortBlockTimer);

            quickBlockTimer          = new System.Timers.Timer();
            quickBlockTimer.Interval = TS_quick.TotalMilliseconds;
            quickBlockTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnQuickBlockTimer);
        }