public void Store(NiceSystemInfo niceSystem, Data_Net__00NormalMessage msg, Data_Net__00NormalMessage.eLocation location, IMyLog log) { try { eLocationToMyFolder(location).WriteToFile(niceSystem, msg, log); } catch (SystemException se) { log.Error("*** SystemException ***"); log.Error(se.Message); } }
public void Delete(NiceSystemInfo niceSystem, string fileName, Data_Net__00NormalMessage.eLocation location, IMyLog log) { try { WithAndWithoutUnderline ww = new WithAndWithoutUnderline( FolderNames.GetFolder(niceSystem, eLocationToMyFolder(location)), fileName); File.Delete(ww.Existing); } catch (SystemException se) { log.Error("*** SystemException ***"); log.Error(se.Message); } }
private static MyFolders eLocationToMyFolder(Data_Net__00NormalMessage.eLocation location) { switch (location) { case Data_Net__00NormalMessage.eLocation.Queued: return(MyFolders.ASP_QueuedMessages_); case Data_Net__00NormalMessage.eLocation.Processed: return(MyFolders.ASP_ProcessedMessages_); case Data_Net__00NormalMessage.eLocation.Disposed: return(MyFolders.ASP_DisposedMessages_); default: throw new ArgumentException("eLocationToMyFolder " + location.ToString()); } }
public void ForEach(NiceSystemInfo niceSystem, DateTime newerThan, string containsUser, Data_Net__00NormalMessage.eLocation location, IMyLog log, dProcess_Data_Net__00NormalMessage cb) { forEach(niceSystem, newerThan, containsUser, eLocationToMyFolder(location), log, cb); }
public void ForEach(NiceSystemInfo niceSystem, Data_Net__00NormalMessage.eLocation location, IMyLog log, dProcess_Data_Net__00NormalMessage cb) { forEach(niceSystem, DateTime.MinValue, null, eLocationToMyFolder(location), log, cb); }
public Data_Net__00NormalMessage ReadOne(NiceSystemInfo niceSystem, string fileName, Data_Net__00NormalMessage.eLocation location, IMyLog log) { try { WithAndWithoutUnderline ww = new WithAndWithoutUnderline( FolderNames.GetFolder(niceSystem, eLocationToMyFolder(location)), fileName); Data_Net__00NormalMessage o = null; Stream stream = OpenFile.ForRead(ww.Existing, false, false, log); if (stream == null) { return(null); } using (BinaryReader br = new BinaryReader(stream)) { ASPTrayBase ox = ASPTrayBase.ReadOne(br); if (ox.GetEnumType() == ASPTrayBase.eASPtrayType.NormalMessage) { o = (Data_Net__00NormalMessage)ox; } } return(o); } catch (SystemException se) { log.Error("*** SystemException ***"); log.Error(se.Message); } return(null); }