- mailserver_latest.zip
- MailServer_latest
- LumiSoft
- DelObj.exe
- MailServer
- Application
- errors.txt
- Filters
- lsSpamFilter
- lsVirusFilter
- help.txt
- Help
- Server&API
- Help
- LSServer&API.chm
- Untitled.ndoc
- User
- ENG
- _Images
- alias.jpg
- aliases.jpg
- domain.jpg
- domains.jpg
- filter.jpg
- filters.jpg
- logo.jpg
- main.jpg
- route.jpg
- routing.jpg
- securit1.jpg
- securit2.jpg
- security.jpg
- server.jpg
- sys_delivery.jpg
- sys_general.jpg
- sys_imap.jpg
- sys_pop3.jpg
- sys_smtp.jpg
- user1.jpg
- user2.jpg
- users.jpg
- Admin
- def.htm
- Install
- Intro
- mailserver.hhp
- MailServer_ENG.chm
- Problems
- Start.htm
- Started
- style.css
- Table of Contents.hhc
- Windows
- Install
- MailServer
- MailServerManager
- RFC
- ServerAPI
- SQL_Database
- Stuff
- NNTP
- ToDo.txt
- version.txt
- WebMail
- Net
- NetHelp
- Help
- LumiSoft.Net_Help.chm
- Untitled.ndoc
- UI
- Help
- Images
- outlookBar.gif
- outlookBarFullSelect.gif
- outlookBarIconSelect.gif
- outlookBarSmallIcon.gif
- outlookBarStuckenItem.gif
- Lib
- TestUI
- ToDo.txt
- Tools
- UI_rem_ISupportInitialize
- UI_version.txt
- smtppop3mailserver.zip
- LumiSoft
- DelObj.exe
- MailServer
- Net
- UI
- Help
- Images
- outlookBar.gif
- outlookBarFullSelect.gif
- outlookBarIconSelect.gif
- outlookBarSmallIcon.gif
- outlookBarStuckenItem.gif
- Lib
- TestUI
- UI_version.txt
|
using System;
using System.Collections;
namespace LumiSoft.Net.NNTP.Server
{
/// <summary>
/// NNTP newsgroups collection.
/// </summary>
public class NNTP_NewsGroups
{
private Hashtable m_pNewsgroups = null;
/// <summary>
/// Default constructor
/// </summary>
public NNTP_NewsGroups()
{
m_pNewsgroups = new Hashtable();
}
/// <summary>
/// Gets newsgroups which are created after specified date.
/// </summary>
/// <param name="startDate"></param>
/// <param name="newsgroups"></param>
/// <returns></returns>
public NNTP_NewsGroup[] GetFilteredNewsgroups(DateTime startDate,string newsgroups)
{
ArrayList retVal = new ArrayList();
foreach(NNTP_NewsGroup group in this.Newsgroups){
if(newsgroups.Length == 0){
if(group.CreateDate.CompareTo(startDate) > 0){
retVal.Add(group);
}
}
else{
throw new Exception("To do: NNTP_NewsGroups.GetFilteredNewsgroups");
}
}
NNTP_NewsGroup[] retGroups = new NNTP_NewsGroup[retVal.Count];
retVal.CopyTo(retGroups);
return retGroups;
}
/// <summary>
/// Adds new newsgroup to newsgroups list.
/// </summary>
/// <param name="newsgroupName">Newsgroup name.</param>
/// <param name="articlesCount">Count of articles in newsgroup.</param>
/// <param name="creDate">Newsgroup creation time.</param>
public void Add(string newsgroupName,int articlesCount,int firstArticle,int lastArticle,DateTime creDate)
{
m_pNewsgroups.Add(newsgroupName,new NNTP_NewsGroup(newsgroupName,articlesCount,firstArticle,lastArticle,creDate));
}
/// <summary>
/// Removes a newsgroup from the list
/// </summary>
/// <param name="newsgroupName">Newsgroup name.</param>
public void Remove(string newsgroupName)
{
m_pNewsgroups.Remove(newsgroupName);
}
/// <summary>
/// Determines whether contains this newsgroup.
/// </summary>
/// <param name="newsgroupName"></param>
/// <returns></returns>
public bool Contains(string newsgroupName)
{
return m_pNewsgroups.ContainsKey(newsgroupName);
}
/// <summary>
/// Gets specified newsgroup.
/// </summary>
public NNTP_NewsGroup this[string newsgroupName]
{
get{ return (NNTP_NewsGroup)m_pNewsgroups[newsgroupName]; }
}
/// <summary>
/// Gets newsgroup list.
/// </summary>
public NNTP_NewsGroup[] Newsgroups
{
get{
NNTP_NewsGroup[] groups = new NNTP_NewsGroup[m_pNewsgroups.Count];
m_pNewsgroups.Values.CopyTo(groups,0);
return groups;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.