示例#1
0
            internal ContentType(XmlNode node)
            {
                foreach (var attrObj in node.Attributes)
                {
                    var attr = (XmlAttribute)attrObj;
                    var text = attr.Value;

                    switch (attr.Name)
                    {
                    case "id":
                        this.Id = attr.Value;
                        break;

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

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

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

                    case "duration":
                        this.Duration = TimeSpan.FromSeconds(
                            StrUtil.ToInt(text, 0));
                        break;
                    }
                }

                this.Content = node.InnerText;
            }
示例#2
0
            internal TwitterInfoType(XmlNode node)
            {
                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "status":
                        this.Status = text;
                        break;

                    case "after_auth":
                        this.AfterAuth = text;
                        break;

                    case "screen_name":
                        this.Name = text;
                        break;

                    case "followers_count":
                        this.FollowersCount = StrUtil.ToInt(text, 0);
                        break;

                    case "is_vip":
                        this.IsVip = StrUtil.ToBool(text, false);
                        break;

                    case "profile_image_url":
                        this.ImageUrl = text;
                        break;

                    case "tweet_token":
                        this.TweetToken = text;
                        break;
                    }
                }
            }
示例#3
0
            internal TwitterType(XmlNode node)
            {
                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "live_enabled":
                        this.IsEnabled = StrUtil.ToBool(text, false);
                        break;

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

                    case "live_api_url":
                        this.LiveApiUrl = text;
                        break;
                    }
                }
            }
示例#4
0
            internal RTMPType(XmlNode node)
            {
                foreach (var attrObj in node.Attributes)
                {
                    var attr = (XmlAttribute)attrObj;
                    var text = attr.Value;

                    switch (attr.Name)
                    {
                    case "is_fms":
                        this.IsFms = StrUtil.ToBool(text, false);
                        break;

                    case "rtmpt_port":
                        this.Port = StrUtil.ToInt(text, 0);
                        break;
                    }
                }

                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "url":
                        this.Url = text;
                        break;

                    case "ticket":
                        this.Ticket = text;
                        break;
                    }
                }
            }
示例#5
0
            internal UserType(XmlNode node)
                : this()
            {
                foreach (var childObj in node.ChildNodes)
                {
                    var child = (XmlNode)childObj;
                    var text  = child.InnerText;

                    switch (child.Name)
                    {
                    case "nickname":
                        this.NickName = text;
                        break;

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

                    case "user_id":
                        this.UserId = StrUtil.ToInt(text, -1);
                        break;
                    }
                }
            }
示例#6
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;
                    }
                }
            }
示例#7
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;
                    }
                }
            }
示例#8
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;
                    }
                }
            }