public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.Login         = serializer.GetSingle("login");
            this.MessageId     = serializer.GetSingle("msg-id");
            this.SystemMessage = serializer.GetSingle("system-msg");

            this.MsgParamCumulativeMonths     = serializer.GetSingle("msg-param-cumulative-months");
            this.MsgParamDisplayname          = serializer.GetSingle("msg-param-displayName");
            this.MsgParamLogin                = serializer.GetSingle("msg-param-login");
            this.MsgParamMonths               = serializer.GetSingle("msg-param-months");
            this.MsgParamPromoGiftTotal       = serializer.GetSingle("msg-param-promo-gift-total");
            this.MsgParamPromoName            = serializer.GetSingle("msg-param-promo-name");
            this.MsgParamRecipientDisplayName = serializer.GetSingle("msg-param-recipient-display-name");
            this.MsgParamRecipientId          = serializer.GetSingle("msg-param-recipient-id");
            this.MsgParamRecipientUserName    = serializer.GetSingle("msg-param-recipient-user-name");
            this.MsgParamSenderLogin          = serializer.GetSingle("msg-param-sender-login");
            this.MsgParamSenderName           = serializer.GetSingle("msg-param-sender-name");
            this.MsgParamShouldShareStreak    = serializer.GetSingle("msg-param-should-share-streak");
            this.MsgParamStreakMonths         = serializer.GetSingle("msg-param-streak-months");
            this.MsgParamSubPlan              = serializer.GetSingle("msg-param-sub-plan");
            this.MsgParamSubPlanName          = serializer.GetSingle("msg-param-sub-plan-name");
            this.MsgParamViewerCount          = serializer.GetSingle("msg-param-viewerCount");
            this.MsgParamRitualName           = serializer.GetSingle("msg-param-ritual-name");
            this.MsgParamThreshold            = serializer.GetSingle("msg-param-threshold");
        }
Example #2
0
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.Login           = serializer.GetSingle("login");
            this.Message         = serializer.GetSingle("message");
            this.TargetMessageid = serializer.GetSingle("target-msg-id");
        }
Example #3
0
        public override void Write(TagsSerializer serializer)
        {
            base.Write(serializer);

            foreach (var pair in this.Raw)
            {
                serializer.Raw[pair.Key] = pair.Value;
            }
        }
Example #4
0
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.BadgeInfo   = Badge.Parse(serializer.GetSingle("badge-info"));
            this.Badeges     = serializer.GetList("badges").Select(b => Badge.Parse(b)).ToArray(v => v != null);
            this.Color       = serializer.GetSingle("color");
            this.DisplayName = serializer.GetSingle("display-name");
        }
Example #5
0
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.EmoteOnly     = TagsUtils.ToBool(serializer.GetSingle("emote-only"));
            this.FollowersOnly = serializer.GetSingle("followers-only");
            this.R9K           = TagsUtils.ToBool(serializer.GetSingle("r9k"));
            this.Slow          = TagsUtils.ToBool(serializer.GetSingle("slow"));
            this.SubsOnly      = TagsUtils.ToBool(serializer.GetSingle("subs-only"));
        }
Example #6
0
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.Raw.Clear();

            foreach (var pair in serializer.Raw)
            {
                this.Raw[pair.Key] = pair.Value;
            }
        }
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.Emotes        = serializer.GetList("emotes", Emote.EmotesSeparator).Select(text => Emote.Parse(text)).ToArray(v => v != null);
            this.Id            = serializer.GetSingle("id");
            this.Message       = serializer.GetSingle("message");
            this.Mod           = serializer.GetSingle("mod");
            this.RoomId        = serializer.GetSingle("room-id");
            this.SentTimestamp = DateTimeOffset.FromUnixTimeMilliseconds(NumberUtils.ToLong(serializer.GetSingle("tmi-sent-ts"))).LocalDateTime;
            this.UserId        = serializer.GetSingle("user-id");
        }
        public void WriteTags <T>(T tagsObject) where T : Tags
        {
            if (tagsObject != null)
            {
                if (this.Tags == null)
                {
                    this.Tags = new Dictionary <string, string>();
                }

                var tagSerializer = new TagsSerializer(this.Tags);
                tagsObject.Write(tagSerializer);
            }
        }
        public T ReadTags <T>(Func <T> constructor) where T : Tags
        {
            var tags = this.Tags;

            if (tags != null)
            {
                var tagSerializer = new TagsSerializer(tags);

                var tagsObject = constructor();
                tagsObject.Read(tagSerializer);

                return(tagsObject);
            }

            return(null);
        }
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.Mod = serializer.GetSingle("mod");
        }
Example #11
0
 public virtual void Write(TagsSerializer serializer)
 {
 }
Example #12
0
 public virtual void Read(TagsSerializer serializer)
 {
 }
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.BanDuration = NumberUtils.ToIntNullable(serializer.GetSingle("ban-duration"));
        }
Example #14
0
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.Bits = serializer.GetSingle("bits");
        }
Example #15
0
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.EmoteSets = serializer.GetList("emote-sets");
        }
Example #16
0
 public override void Write(TagsSerializer serializer)
 {
     base.Write(serializer);
 }
        public override void Read(TagsSerializer serializer)
        {
            base.Read(serializer);

            this.UserId = serializer.GetSingle("user-id");
        }