protected override PSTProcessingResult ProcessQueueObjectImplementation() { IPst rdopststore = null; try { Logger.NLogger.Info("PSTFile: {0} EntryID: {1}", this.PSTFile, this.EntryID); #if USE_PSTSTORE rdopststore = this.PstStore; #else rdopststore = new Pst(this.PSTFile); #endif Message rdomail = null; try { rdomail = (Message)rdopststore.OpenMessage(this.EntryID); rdomail.Pst = (Pst)rdopststore; Logger.NLogger.Info("EntryID: {0}", rdomail.EntryID.ToString()); } catch (Exception ex) { Logger.NLogger.ErrorException("ERROR: ProcessQueueObjectImplementation", ex); } if (rdomail != null) { try { } catch (Exception ex) { Logger.NLogger.ErrorException("ERROR: HandleMessage", ex); } rdomail.Dispose(); rdomail = null; } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.StackTrace); } finally { #if !USE_PSTSTORE if (rdopststore != null) { rdopststore.Dispose(); rdopststore = null; } #endif } PSTProcessingResult result = new PSTProcessingResult() { IsSuccessful = true, Filename = string.Empty }; result.SetProcessingObject <PSTFolderParser>(this); return(result); }
protected override PSTProcessingResult ProcessQueueObjectImplementation() //List<InputOutputThreadObjectHandler<PSTMsgParser>> outputobjects, InputOutputMessageQueue<PSTMsgParser> inqueue, InputOutputMessageQueue<PSTMsgParser> outqueue) { IPst rdopststore = null; try { Logger.NLogger.Info("PSTFile: {0} EntryID: {1}", this.PSTFile, this.EntryID); #if USE_PSTSTORE rdopststore = this.PstStore; #else rdopststore = new Pst(this.PSTFile); #endif Message rdomail = null; try { rdomail = (Message)rdopststore.OpenMessage(this.EntryID); rdomail.Pst = (Pst)rdopststore; Logger.NLogger.Info("EntryID: {0}", rdomail.EntryID.ToString()); } catch (Exception ex) { Logger.NLogger.ErrorException("ERROR: ProcessQueueObjectImplementation", ex); } if (rdomail != null) { try { HandleMessage(rdomail, this.ExportDirectory); //, outputobjects, inqueue, outqueue); } catch (Exception ex) { Logger.NLogger.ErrorException("ERROR: HandleMessage", ex); } rdomail.Dispose(); rdomail = null; } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.StackTrace); } finally { #if !USE_PSTSTORE if (rdopststore != null) { rdopststore.Dispose(); rdopststore = null; } #endif } foreach (string file in this.OutputFiles) { Console.WriteLine(file); } PSTProcessingResult result = new PSTProcessingResult() { IsSuccessful = true, Filename = string.Empty }; result.SetProcessingObject <PSTMsgParser>(this); return(result); }