Пример #1
0
        /// <summary>
        /// 公開マイリスト一覧を取得する
        /// </summary>
        public Session<Response<Mylist.Mylist[]>> DownloadPublicMylistList()
        {
            var session = new Session<Response<Mylist.Mylist[]>>();
            var accessorList = new List<Func<byte[], APIs.IAccesser>>();

            if (!htmlMylistCache.IsAvailab)
                accessorList.Add(
                    (data) =>
                    {
                        var accesser = new APIs.user_mylist_page_html.Accesser();
                        accesser.Setting(
                            context.CookieContainer,
                            target.ID);

                        return accesser;
                    });

            session.SetAccessers(
                accessorList.ToArray(),
                (data) =>
                {
                    var parser = new APIs.user_mylist_page_html.Parser();

                    if (data != null)
                        htmlMylistCache.Value = parser.Parse(data);

                    return Converter.PublicMylistListResponse(context, parser.Parse(htmlMylistCache));
                });

            return session;
        }