C# Класс NntpClient.Client

Connects & performs operations on a usenet server.
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
ArticleExists ( string messageId ) : bool

Gets whether or not the article is available to download.

ArticleExists ( ulong articleId ) : bool

Gets whether or not the article is available to download.

Authenticate ( string user, string pass ) : void

Authenticates credentials against the current server.

Client ( ) : System

Creates a new intance of the client.

Close ( ) : ConnectionResult

Closes the connection & returns the statistics of the session.

Connect ( string hostname, int port, bool ssl ) : void

Opens a connection to the given usenet server on the specified port, and whether or not to use ssl.

Date ( ) : System.DateTime

Gets the current UTC date/time on the server.

Dispose ( ) : void

Closes the connection & disposes of managed resources.

GetArticle ( string messageId, bool bodyOnly = false ) : Article

Downloads an article from usenet with the given ID. Returns null if the article could not be found.

GetArticle ( ulong articleId, bool bodyOnly = false ) : Article

Downloads an article from usenet with the given ID. Returns null if the article could not be found.

GetGroups ( ) : IEnumerable

Returns a collection of available usenet groups.

GetHeaders ( string messageId ) : string>.Dictionary

Fetches only the headers of a message with the given message ID.

GetHeaders ( ulong articleId ) : string>.Dictionary

Fetches only the headers of a message with the given article ID.

GetOverviewFormat ( ) : IEnumerable

Fetches all overview fields supported by the server as a list.

GetXOverview ( ulong articleStart, ulong articleEnd ) : IEnumerable

Fetches overview database information from a group within a given range of article ids. A call to SetGroup must be made before calling this method or it will fail.

SetGroup ( string groupName ) : Group

Sets the current usenet group pointer.

SetGroup ( Group group ) : bool

Sets the current usenet group pointer.

Приватные методы

Метод Описание
CleanUp ( ) : void
ProcessArticle ( ServerReply result, bool bodyOnly ) : Article
ReadHeader ( ) : string>.Dictionary
SetMode ( string mode ) : void

Описание методов

ArticleExists() публичный Метод

Gets whether or not the article is available to download.
public ArticleExists ( string messageId ) : bool
messageId string Message-ID of the article
Результат bool

ArticleExists() публичный Метод

Gets whether or not the article is available to download.
public ArticleExists ( ulong articleId ) : bool
articleId ulong
Результат bool

Authenticate() публичный Метод

Authenticates credentials against the current server.
public Authenticate ( string user, string pass ) : void
user string Usenet username
pass string Usenet password
Результат void

Client() публичный Метод

Creates a new intance of the client.
public Client ( ) : System
Результат System

Close() публичный Метод

Closes the connection & returns the statistics of the session.
public Close ( ) : ConnectionResult
Результат ConnectionResult

Connect() публичный Метод

Opens a connection to the given usenet server on the specified port, and whether or not to use ssl.
public Connect ( string hostname, int port, bool ssl ) : void
hostname string Usenet hostname
port int Port to connect on
ssl bool Uses a secure connection if true
Результат void

Date() публичный Метод

Gets the current UTC date/time on the server.
public Date ( ) : System.DateTime
Результат System.DateTime

Dispose() публичный Метод

Closes the connection & disposes of managed resources.
public Dispose ( ) : void
Результат void

GetArticle() публичный Метод

Downloads an article from usenet with the given ID. Returns null if the article could not be found.
public GetArticle ( string messageId, bool bodyOnly = false ) : Article
messageId string
bodyOnly bool Whether or not to pull down headers with the article or not.
Результат Article

GetArticle() публичный Метод

Downloads an article from usenet with the given ID. Returns null if the article could not be found.
public GetArticle ( ulong articleId, bool bodyOnly = false ) : Article
articleId ulong
bodyOnly bool Whether or not to pull down headers with the article or not.
Результат Article

GetGroups() публичный Метод

Returns a collection of available usenet groups.
public GetGroups ( ) : IEnumerable
Результат IEnumerable

GetHeaders() публичный Метод

Fetches only the headers of a message with the given message ID.
public GetHeaders ( string messageId ) : string>.Dictionary
messageId string Message Id
Результат string>.Dictionary

GetHeaders() публичный Метод

Fetches only the headers of a message with the given article ID.
public GetHeaders ( ulong articleId ) : string>.Dictionary
articleId ulong Article Id
Результат string>.Dictionary

GetOverviewFormat() публичный Метод

Fetches all overview fields supported by the server as a list.
public GetOverviewFormat ( ) : IEnumerable
Результат IEnumerable

GetXOverview() публичный Метод

Fetches overview database information from a group within a given range of article ids. A call to SetGroup must be made before calling this method or it will fail.
public GetXOverview ( ulong articleStart, ulong articleEnd ) : IEnumerable
articleStart ulong The start of the article range to pull overview information for.
articleEnd ulong The end of the article range to pull overview information for.
Результат IEnumerable

SetGroup() публичный Метод

Sets the current usenet group pointer.
public SetGroup ( string groupName ) : Group
groupName string
Результат Group

SetGroup() публичный Метод

Sets the current usenet group pointer.
public SetGroup ( Group group ) : bool
group Group
Результат bool