예제 #1
0
파일: JobLink.cs 프로젝트: git-thinh/appie
 public JobLink(IJobStore _store)
 {
     this.StoreJob = _store;
     list          = new ListThreadSafe <oLink>();
     msg           = new QueueThreadSafe <Message>();
     urlData       = new DictionaryThreadSafe <string, string>();
 }
예제 #2
0
 public JobSpeechEN(IJobStore _store)
 {
     this.StoreJob  = _store;
     this.queue     = new QueueThreadSafe <string>();
     this.storeUrl  = new DictionaryThreadSafe <string, string>();
     this.storePath = new DictionaryThreadSafe <string, string>();
 }
예제 #3
0
        public JobFactory(JOB_TYPE type)
        {
            this.Messages = new QueueThreadSafe <Message>();

            this.Type  = type;
            JobHandles = new DictionaryThreadSafe <int, IJobHandle>();
        }
예제 #4
0
 public JobFileHttp(IJobAction jobAction) : base(JOB_TYPE.FILE_HTTP_CACHE, jobAction)
 {
     msg      = new QueueThreadSafe <Message>();
     fileData = new DictionaryThreadSafe <string, string>();
     server   = new HttpServer();
     server.RequestReceived += f_server_onRequestReceived;
 }
예제 #5
0
        public JobWorker(IJobContext jobContext, JOB_TYPE type)
        {
            this.Messages = new QueueThreadSafe <Message>();

            this.JobContext = jobContext;
            this.Id         = jobContext.f_getTotalJob() + 1;
            this.Type       = type;
            this.Status     = 1; /* 1: init */
        }
예제 #6
0
        public fBase(IJobAction jobAction)
        {
            StoreMessages = new QueueThreadSafe <Message>();
            JobAction     = jobAction;
            //store.f_form_Add(this);
            //this.FormClosing += (se, ev) => { store.f_form_Remove(this); };

            timer_api = new System.Threading.Timer(new System.Threading.TimerCallback((obj) =>
            {
                IFORM form = (IFORM)obj;
                if (StoreMessages.Count > 0)
                {
                    Message m = StoreMessages.Dequeue(null);
                    if (m != null)
                    {
                        OnReceiveMessage?.Invoke(form, m);
                    }
                }
            }), this, 100, 100);
        }
예제 #7
0
 public JobMessage(IJobStore _store)
 {
     this.StoreJob = _store;
     list          = new ListThreadSafe <oLink>();
     msg           = new QueueThreadSafe <Message>();
 }
예제 #8
0
 public JobLink(IJobAction jobAction) : base(JOB_TYPE.LINK, jobAction)
 {
     list    = new ListThreadSafe <oLink>();
     msg     = new QueueThreadSafe <Message>();
     urlData = new DictionaryThreadSafe <string, string>();
 }
예제 #9
0
 public AtController(ComPortSettings settings, Action <ComPortErrorNames, Exception> errorCallback)
 {
     port = new ComPort(settings, rcv, errorCallback);
     cmdQ = new QueueThreadSafe <AtCommand>();
 }