public string ToStringWithRank(int rank, HoseiKind hosei_kind, int mylist_rate) { if (status_ == Status.DELETED) { return(video_id + "\tDELETED"); } else if (status_ == Status.NOT_FOUND) { return(video_id + "\tDELETED"); } else if (status_ == Status.OTHER) { return(video_id + ""); } else { StringBuilder buff = new StringBuilder(); buff.Append(video_id); buff.Append("\t"); buff.Append(rank.ToString()); buff.Append("\t"); buff.Append(IJStringUtil.ToStringWithComma(point.view)); buff.Append("\t"); buff.Append(IJStringUtil.ToStringWithComma(point.res)); buff.Append("\t"); buff.Append(IJStringUtil.ToStringWithComma(point.mylist)); buff.Append("\t"); buff.Append(point.GetHoseiString(hosei_kind, mylist_rate, 2, hosei_kind == HoseiKind.Nicoran)); buff.Append("\t"); buff.Append(point.GetMylistRateString()); buff.Append("\t"); buff.Append(IJStringUtil.ToStringWithComma(point.CalcScore(hosei_kind, mylist_rate))); buff.Append("\t"); buff.Append(title); buff.Append("\t"); buff.Append(NicoUtil.DateToString(submit_date)); buff.Append("\t"); buff.Append(video_id + ".png"); buff.Append("\t"); buff.Append(pname); buff.Append("\t"); buff.Append(tag_set.ToString()); return(buff.ToString()); } }
public void VideoToString(Video video, StringBuilder buff, int line_number) { switch (kind_) { case Kind.Literal: buff.Append(text_); break; case Kind.Id: buff.Append(video.video_id); break; case Kind.View: buff.Append(is_comma_ ? IJStringUtil.ToStringWithComma(video.point.view) : video.point.view.ToString()); break; case Kind.Res: buff.Append(is_comma_ ? IJStringUtil.ToStringWithComma(video.point.res) : video.point.res.ToString()); break; case Kind.Mylist: buff.Append(is_comma_ ? IJStringUtil.ToStringWithComma(video.point.mylist) : video.point.mylist.ToString()); break; case Kind.Title: if (video.GetStatus() == Video.Status.DELETED) { buff.Append("DELETED"); } else { buff.Append(video.title); } break; case Kind.Date: if (text_ != "") // 日時用の書式が存在するなら { buff.Append(video.submit_date.ToString(text_)); } else { buff.Append(NicoUtil.DateToString(video.submit_date)); } break; case Kind.Description: buff.Append(video.description); break; case Kind.LineNumber: // num_ は offset buff.Append((line_number + num_).ToString()); break; case Kind.Tag: // text_ は separator if (arrange_ == "daily") { buff.Append(video.tag_set.GetDisplayingTag()); } else { buff.Append(video.tag_set.ToStringWithSplitter(text_)); } break; case Kind.ExtractTag: if (obj_ != null) { buff.Append(video.tag_set.ExtractTag((Regex)obj_)); } break; case Kind.Expression: buff.Append(DoCalc(text_, video)); break; case Kind.UserText: buff.Append(video.GetUserText(num_)); break; case Kind.Special: break; } }
public string ToStringForSpecial() { return(video_id + "\t" + IJStringUtil.ToStringWithComma(point.view) + "\t" + IJStringUtil.ToStringWithComma(point.res) + "\t" + IJStringUtil.ToStringWithComma(point.mylist) + "\t" + title + "\t" + NicoUtil.DateToString(submit_date) + "\t" + tag_set.ToStringSpace()); }