Ejemplo n.º 1
0
        private NotificationFileCollection ReadAllNotificationFilesFromDisk()
        {
            NotificationFileCollection RetVal = new NotificationFileCollection();

            string[] Files = Directory.GetFiles(_InboxDir, "*--*--*.xml");
            foreach (string FileName in Files)
            {
                FileInfo Info = new FileInfo(FileName);
                RetVal.Add(new NotificationFile(Info.Name, Info.CreationTime));
            }
            RetVal.RemoveNewFiles(30);
            RetVal.SortByAge();
            return(RetVal);
        }
Ejemplo n.º 2
0
        private NotificationFile GetNextNotificationFile()
        {
            NotificationFile RetVal = null;

            if (_NFileCache == null || _NFileCache.Count == 0)
            {
                _NFileCache = ReadAllNotificationFilesFromDisk();
            }
            if (_NFileCache.Count > 0)
            {
                RetVal = _NFileCache.GetFileAt(0);
                _NFileCache.RemoveFileAt(0);
            }
            return(RetVal);
        }
 private NotificationFileCollection ReadAllNotificationFilesFromDisk()
 {
     NotificationFileCollection RetVal = new NotificationFileCollection();
       string[] Files = Directory.GetFiles(_InboxDir, "*--*--*.xml");
       foreach (string FileName in Files) {
     FileInfo Info = new FileInfo(FileName);
     RetVal.Add(new NotificationFile(Info.Name, Info.CreationTime));
       }
       RetVal.RemoveNewFiles(30);
       RetVal.SortByAge();
       return RetVal;
 }
 private NotificationFile GetNextNotificationFile()
 {
     NotificationFile RetVal = null;
       if (_NFileCache == null || _NFileCache.Count == 0) {
     _NFileCache = ReadAllNotificationFilesFromDisk();
       }
       if (_NFileCache.Count > 0) {
     RetVal = _NFileCache.GetFileAt(0);
     _NFileCache.RemoveFileAt(0);
       }
       return RetVal;
 }