Пример #1
0
 // コンストラクタ
 public GenericNichanThread(string host, string itaName, int threadNumber, string title, int latestResNumber, GenericNichanBoard board)
     : base(host, itaName, threadNumber, title, latestResNumber, board)
 {
 }
Пример #2
0
        // 板オブジェクトを作成する
        private static IBoard CreateBoard(Uri uri)
        {
            // 適切な板クラスを選択して、実体化する
            IBoard board = null;
            if (ShitarabaBoard.IsBoardUri(uri))
            {
                board = new ShitarabaBoard(uri);
            }
            else if (WaiwaiBoard.IsBoardUri(uri))
            {
                board = new WaiwaiBoard(uri);
            }
            else if (BintanBoard.IsBoardUri(uri))
            {
                board = new BintanBoard(uri);
            }
            else if (GenericNichanBoard.IsBoardUri(uri))
            {
                board = new GenericNichanBoard(uri);
            }
            else
                throw new ApplicationException("URLは対応した掲示板ではありません");

            return board;
        }