📄 nntpgroup.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
namespace AspNetForums.Components {
class NntpGroup {
string groupName;
int totalPosts = 0;
int startPostNumber = 0;
int endPostNumber = 0;
public NntpGroup(string groupName, int totalPosts, int startPostNumber, int endPostNumber) {
Init(groupName, totalPosts, startPostNumber, endPostNumber);
}
// Parse out the raw response
//
public NntpGroup(string rawNntpResponse) {
// Expected format:
//
// 211 36762 50769 142352 microsoft.public.dotnet.framework.aspnet
string[] splitRawResponse = rawNntpResponse.Split(' ');
Init(splitRawResponse[4], int.Parse(splitRawResponse[1]), int.Parse(splitRawResponse[2]), int.Parse(splitRawResponse[3]) );
}
private void Init(string groupName, int totalPosts, int startPostNumber, int endPostNumber) {
this.groupName = groupName;
this.totalPosts = totalPosts;
this.startPostNumber = startPostNumber;
this.endPostNumber = endPostNumber;
}
public string Name {
get {
return groupName;
}
}
public int TotalPosts {
get {
return totalPosts;
}
}
public int StartPostNumber {
get {
return startPostNumber;
}
}
public int EndPostNumber {
get {
return endPostNumber;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -