Пример #1
0
        public ThreadedDictionary(string file, bool gzip)
            : base()
        {
            UpdateTime     = DateTime.MinValue.AddMilliseconds(1);
            FileDictionary = new File(file, gzip);
            Methods        = new ThreadedMethod(1, ThreadPriority.Lowest, 10);

            string data = FileDictionary.Load();

            if (System.String.IsNullOrEmpty(data))
            {
                return;
            }

            this.XmlDeserialize(data);
        }
Пример #2
0
        public bool Run(Expression <Action> EAMethod, int interval, int delay, string ID, bool waitForAccess)
        {
            if (System.String.IsNullOrEmpty(ID))
            {
                ID = Expressions.nameofFull(EAMethod);
            }

            if (Threads == null)
            {
                Threads = new ThreadedMethod(this.MaxThreadsCount, ThreadPriority.Lowest, 1);
            }


            Threads.Run(() => this.Run(EAMethod, interval, ID, waitForAccess), ID, delay, true, true, false);

            return(false);
        }