Пример #1
0
 private void SendRequest()
 {
     while (true)
     {
         try
         {
             var chromatogramCache = ChorusSession.GenerateChromatograms(ChorusAccount, ChorusUrl, ChromatogramRequestDocument);
             if (null == chromatogramCache)
             {
                 return;
             }
             var chromKeyIndiceses = chromatogramCache.GetChromKeys(ChorusUrl).ToList();
             lock (this)
             {
                 _chromatogramCache = chromatogramCache;
                 _chromKeyIndiceses = chromKeyIndiceses;
             }
             return;
         }
         catch (Exception exception)
         {
             ChromTaskList.HandleException(exception);
             return;
         }
     }
 }
Пример #2
0
 public ChorusScanProvider(string docFilePath, ChorusUrl chorusUrl, ChromSource source, float[] times,
                           TransitionFullScanInfo[] transitions)
 {
     ChorusUrl      = chorusUrl;
     DocFilePath    = docFilePath;
     DataFilePath   = chorusUrl;
     Source         = source;
     Times          = times;
     Transitions    = transitions;
     _chorusSession = new ChorusSession();
 }
Пример #3
0
 public ChromTaskList(Action checkCancelledAction, SrmDocument srmDocument, ChorusAccount chorusAccount, ChorusUrl chorusUrl, IEnumerable <ChromatogramRequestDocument> chromatogramRequestDocuments)
 {
     SrmDocument                 = srmDocument;
     ChorusSession               = new ChorusSession();
     _checkCancelledAction       = checkCancelledAction;
     _chromatogramGeneratorTasks = new List <ChromatogramGeneratorTask>();
     _chromKeys = new Dictionary <ChromKey, ChromatogramGeneratorTask>();
     foreach (var chunk in chromatogramRequestDocuments)
     {
         ChromatogramGeneratorTask task = new ChromatogramGeneratorTask(this, chorusAccount, chorusUrl, chunk);
         _chromatogramGeneratorTasks.Add(task);
         foreach (ChromKey chromKey in ListChromKeys(chunk))
         {
             _chromKeys[chromKey] = task;
         }
     }
     _executingTasks = new HashSet <ChromatogramGeneratorTask>();
 }
Пример #4
0
        public void HandleException(Exception exception)
        {
            var webException = exception as WebException;

            if (null != webException)
            {
                exception = ChorusSession.WrapWebException(webException);
            }
            lock (LockObj)
            {
                if (null != _exception)
                {
                    return;
                }
                _exception = exception;
                ChorusSession.Abort();
                Monitor.PulseAll(LockObj);
            }
        }