Example #1
0
            internal StreamType(XmlNode node)
                : this()
            {
                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "id":
                        this.Id = int.Parse(text.Substring(2));
                        break;

                    case "title":
                        this.Title = text;
                        break;

                    case "description":
                        this.Description = text;
                        break;

                    case "comment_count":
                        this.CommentCount = StrUtil.ToInt(text, 0);
                        break;

                    case "watch_count":
                        this.WatchCount = StrUtil.ToInt(text, 0);
                        break;

                    case "danjo_comment_mode":
                        this.DanjoCommentMode = StrUtil.ToBool(text, false);
                        break;

                    case "nicoden":
                        this.IsNicoDen = StrUtil.ToBool(text, false);
                        break;

                    case "allow_netduetto":
                        this.AllowNetduetto = StrUtil.ToBool(text, false);
                        break;

                    case "relay_comment":
                        this.RelayComment = text;
                        break;

                    case "park":
                        this.IsPark = StrUtil.ToBool(text, false);
                        break;

                    case "nd_token":
                        this.NdToken = text;
                        break;

                    case "bourbon_url":
                        this.BourbonUrl = text;
                        break;

                    case "full_video":
                        this.FullVideo = text;
                        break;

                    case "after_video":
                        this.AfterVideo = text;
                        break;

                    case "before_video":
                        this.BeforeVideo = text;
                        break;

                    case "kickout_video":
                        this.KickoutVideo = text;
                        break;

                    case "header_comment":
                        this.HeaderComment = text;
                        break;

                    case "footer_comment":
                        this.FooterComment = text;
                        break;

                    case "plugin_delay":
                        this.PluginDelay = text;
                        break;

                    case "plugin_url":
                        this.PluginUrl = text;
                        break;

                    case "provider_type":
                        this.ProviderType = StrUtil.ToProvider(text);
                        break;

                    case "default_community":
                        this.DefaultCommunity = text;
                        break;

                    case "archive":
                        this.IsArchive = StrUtil.ToBool(text, false);
                        break;

                    case "is_dj_stream":
                        this.IsDjStream = StrUtil.ToBool(text, false);
                        break;

                    case "twitter_tag":
                        this.TwitterTag = text;
                        break;

                    case "is_owner":
                        this.IsOwner = StrUtil.ToBool(text, false);
                        break;

                    case "owner_id":
                        this.OwnerId = StrUtil.ToInt(text, -1);
                        break;

                    case "owner_name":
                        this.OwnerName = text;
                        break;

                    case "is_reserved":
                        this.IsReserved = StrUtil.ToBool(text, false);
                        break;

                    case "base_time":
                        this.BaseTime = StrUtil.ToDateTime(text);
                        break;

                    case "open_time":
                        this.OpenTime = StrUtil.ToDateTime(text);
                        break;

                    case "start_time":
                        this.StartTime = StrUtil.ToDateTime(text);
                        break;

                    case "end_time":
                        this.EndTime = StrUtil.ToDateTime(text);
                        break;

                    case "ichiba_notice_enable":
                        this.IsIchibaNoticeEnable = StrUtil.ToBool(text, false);
                        break;

                    case "comment_lock":
                        this.IsCommentLock = StrUtil.ToBool(text, false);
                        break;

                    case "background_comment":
                        this.IsBackgroundComment = StrUtil.ToBool(text, false);
                        break;

                    case "contents_list":
                        foreach (var childObj2 in child.ChildNodes)
                        {
                            var child2 = (XmlNode)childObj2;

                            if (child2.Name == "contents")
                            {
                                var content = new ContentType(child2);
                                this.ContentList.Add(content);
                            }
                        }
                        break;

                    case "press":
                        this.Press = new PressType(child);
                        break;
                    }
                }
            }
Example #2
0
            internal UserType(XmlNode node)
                : this()
            {
                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "room_label":
                        this.RoomLabel = text;
                        break;

                    case "room_seetno":
                        this.RoomSeetNo = StrUtil.ToInt(text, 0);
                        break;

                    case "userAge":
                        this.UserAge = StrUtil.ToInt(text, 0);
                        break;

                    case "userSex":
                        this.UserGender = StrUtil.ToGender(text);
                        break;

                    case "userPrefecture":
                        this.UserPrefecture = text;
                        break;

                    case "nickname":
                        this.NickName = text;
                        break;

                    case "is_premium":
                        this.IsPremium = StrUtil.ToBool(text, false);
                        break;

                    case "user_id":
                        this.UserId = int.Parse(text);
                        break;

                    case "hkey":
                        this.HKey = text;
                        break;

                    case "is_join":
                        this.IsJoin = StrUtil.ToBool(text, false);
                        break;

                    case "immu_comment":
                        this.ImmuComment = text;
                        break;

                    case "can_broadcast":
                        this.CanBroadcast = text;
                        break;

                    case "can_forcelogin":
                        this.CanForceLogin = text;
                        break;

                    case "twitter_info":
                        this.TwitterInfo = new TwitterInfoType(child);
                        break;
                    }
                }
            }
Example #3
0
            internal StreamType(XmlNode node)
                : this()
            {
                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "id":
                        this.Id = text;
                        break;

                    case "token":
                        this.Token = text;
                        break;

                    case "exclude":
                        this.Exclude = StrUtil.ToBool(text, false);
                        break;

                    case "provider_type":
                        this.ProviderType = StrUtil.ToProvider(text);
                        break;

                    case "base_time":
                        this.BaseTime = StrUtil.ToDateTime(text);
                        break;

                    case "open_time":
                        this.OpenTime = StrUtil.ToDateTime(text);
                        break;

                    case "start_time":
                        this.StartTime = StrUtil.ToDateTime(text);
                        break;

                    case "end_time":
                        this.EndTime = StrUtil.ToDateTime(text);
                        break;

                    case "allow_vote":
                        this.AllowVote = StrUtil.ToBool(text, false);
                        break;

                    case "disable_adaptive_bitrate":
                        this.IsAdaptiveBitrateEnabled = !StrUtil.ToBool(text, true);
                        break;

                    case "is_reserved":
                        this.IsReserved = StrUtil.ToBool(text, false);
                        break;

                    case "category":
                        this.Category = text;
                        break;

                    case "for_mobile":
                        this.ForMobile = StrUtil.ToBool(text, false);
                        break;
                    }
                }
            }