Serialize() public static method

public static Serialize ( bool src, BinaryWriter writer ) : void
src bool
writer System.IO.BinaryWriter
return void
Exemplo n.º 1
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     ComputeFlags();
     bw.Write(flags);
     bw.Write(date);
     bw.Write(expires);
     BoolUtil.Serialize(test_mode, bw);
     bw.Write(this_dc);
     ObjectUtils.SerializeObject(dc_options, bw);
     bw.Write(chat_size_max);
     bw.Write(megagroup_size_max);
     bw.Write(forwarded_count_max);
     bw.Write(online_update_period_ms);
     bw.Write(offline_blur_timeout_ms);
     bw.Write(offline_idle_timeout_ms);
     bw.Write(online_cloud_timeout_ms);
     bw.Write(notify_cloud_delay_ms);
     bw.Write(notify_default_delay_ms);
     bw.Write(chat_big_size);
     bw.Write(push_chat_period_ms);
     bw.Write(push_chat_limit);
     bw.Write(saved_gifs_limit);
     bw.Write(edit_time_limit);
     bw.Write(rating_e_decay);
     bw.Write(stickers_recent_limit);
     if ((flags & 1) != 0)
     {
         bw.Write(tmp_sessions.Value);
     }
     ObjectUtils.SerializeObject(disabled_features, bw);
 }
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(ChatId);
     BoolUtil.Serialize(Enabled, bw);
     bw.Write(Version);
 }
Exemplo n.º 3
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(UserId);
     bw.Write(Date);
     ObjectUtils.SerializeObject(Photo, bw);
     BoolUtil.Serialize(Previous, bw);
 }
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     StringUtil.Serialize(type, bw);
     StringUtil.Serialize(message, bw);
     ObjectUtils.SerializeObject(media, bw);
     BoolUtil.Serialize(popup, bw);
 }
Exemplo n.º 5
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(chat_id);
     bw.Write(user_id);
     BoolUtil.Serialize(is_admin, bw);
     bw.Write(version);
 }
Exemplo n.º 6
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(user_id);
     bw.Write(date);
     ObjectUtils.SerializeObject(photo, bw);
     BoolUtil.Serialize(previous, bw);
 }
Exemplo n.º 7
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(this.Constructor);
     bw.Write(this.ChatId);
     bw.Write(this.UserId);
     BoolUtil.Serialize(this.IsAdmin, bw);
     bw.Write(this.Version);
 }
Exemplo n.º 8
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Id);
     StringUtil.Serialize(FirstName, bw);
     StringUtil.Serialize(LastName, bw);
     StringUtil.Serialize(Username, bw);
     StringUtil.Serialize(Phone, bw);
     ObjectUtils.SerializeObject(Photo, bw);
     ObjectUtils.SerializeObject(Status, bw);
     BoolUtil.Serialize(Inactive, bw);
 }
Exemplo n.º 9
0
        public override void SerializeBody(BinaryWriter bw)
        {
            bw.Write(Constructor);
            bw.Write(Flags);

            bw.Write(Date);
            bw.Write(Expires);
            BoolUtil.Serialize(TestMode, bw);
            bw.Write(ThisDc);
            ObjectUtils.SerializeObject(DcOptions, bw);
            bw.Write(ChatSizeMax);
            bw.Write(MegagroupSizeMax);
            bw.Write(ForwardedCountMax);
            bw.Write(OnlineUpdatePeriodMs);
            bw.Write(OfflineBlurTimeoutMs);
            bw.Write(OfflineIdleTimeoutMs);
            bw.Write(OnlineCloudTimeoutMs);
            bw.Write(NotifyCloudDelayMs);
            bw.Write(NotifyDefaultDelayMs);
            bw.Write(ChatBigSize);
            bw.Write(PushChatPeriodMs);
            bw.Write(PushChatLimit);
            bw.Write(SavedGifsLimit);
            bw.Write(EditTimeLimit);
            bw.Write(RatingEDecay);
            bw.Write(StickersRecentLimit);
            bw.Write(StickersFavedLimit);
            if ((Flags & 1) != 0)
            {
                bw.Write(TmpSessions.Value);
            }
            bw.Write(PinnedDialogsCountMax);
            bw.Write(CallReceiveTimeoutMs);
            bw.Write(CallRingTimeoutMs);
            bw.Write(CallConnectTimeoutMs);
            bw.Write(CallPacketTimeoutMs);
            StringUtil.Serialize(MeUrlPrefix, bw);
            if ((Flags & 4) != 0)
            {
                StringUtil.Serialize(SuggestedLangCode, bw);
            }
            if ((Flags & 4) != 0)
            {
                bw.Write(LangPackVersion.Value);
            }
            ObjectUtils.SerializeObject(DisabledFeatures, bw);
        }
Exemplo n.º 10
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(Flags);
     if ((Flags & 1) != 0)
     {
         BoolUtil.Serialize(ShowPreviews.Value, bw);
     }
     if ((Flags & 2) != 0)
     {
         BoolUtil.Serialize(Silent.Value, bw);
     }
     if ((Flags & 4) != 0)
     {
         bw.Write(MuteUntil.Value);
     }
     if ((Flags & 8) != 0)
     {
         StringUtil.Serialize(Sound, bw);
     }
 }
Exemplo n.º 11
0
        public override void SerializeBody(BinaryWriter bw)
        {
            bw.Write(this.Constructor);
            this.ComputeFlags();
            bw.Write(this.Flags);

            bw.Write(this.Date);
            bw.Write(this.Expires);
            BoolUtil.Serialize(this.TestMode, bw);
            bw.Write(this.ThisDc);
            ObjectUtils.SerializeObject(this.DcOptions, bw);
            bw.Write(this.ChatSizeMax);
            bw.Write(this.MegagroupSizeMax);
            bw.Write(this.ForwardedCountMax);
            bw.Write(this.OnlineUpdatePeriodMs);
            bw.Write(this.OfflineBlurTimeoutMs);
            bw.Write(this.OfflineIdleTimeoutMs);
            bw.Write(this.OnlineCloudTimeoutMs);
            bw.Write(this.NotifyCloudDelayMs);
            bw.Write(this.NotifyDefaultDelayMs);
            bw.Write(this.ChatBigSize);
            bw.Write(this.PushChatPeriodMs);
            bw.Write(this.PushChatLimit);
            bw.Write(this.SavedGifsLimit);
            bw.Write(this.EditTimeLimit);
            bw.Write(this.RatingEDecay);
            bw.Write(this.StickersRecentLimit);
            if ((this.Flags & 1) != 0)
            {
                bw.Write(this.TmpSessions.Value);
            }

            bw.Write(this.PinnedDialogsCountMax);
            bw.Write(this.CallReceiveTimeoutMs);
            bw.Write(this.CallRingTimeoutMs);
            bw.Write(this.CallConnectTimeoutMs);
            bw.Write(this.CallPacketTimeoutMs);
            StringUtil.Serialize(this.MeUrlPrefix, bw);
            ObjectUtils.SerializeObject(this.DisabledFeatures, bw);
        }
Exemplo n.º 12
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(UserId);
     BoolUtil.Serialize(Blocked, bw);
 }
Exemplo n.º 13
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(this.Constructor);
     bw.Write(this.UserId);
     BoolUtil.Serialize(this.Mutual, bw);
 }
Exemplo n.º 14
0
        public override void SerializeBody(BinaryWriter bw)
        {
            bw.Write(Constructor);
            bw.Write(Flags);



            bw.Write(Date);
            bw.Write(Expires);
            BoolUtil.Serialize(TestMode, bw);
            bw.Write(ThisDc);
            ObjectUtils.SerializeObject(DcOptions, bw);
            StringUtil.Serialize(DcTxtDomainName, bw);
            bw.Write(ChatSizeMax);
            bw.Write(MegagroupSizeMax);
            bw.Write(ForwardedCountMax);
            bw.Write(OnlineUpdatePeriodMs);
            bw.Write(OfflineBlurTimeoutMs);
            bw.Write(OfflineIdleTimeoutMs);
            bw.Write(OnlineCloudTimeoutMs);
            bw.Write(NotifyCloudDelayMs);
            bw.Write(NotifyDefaultDelayMs);
            bw.Write(PushChatPeriodMs);
            bw.Write(PushChatLimit);
            bw.Write(SavedGifsLimit);
            bw.Write(EditTimeLimit);
            bw.Write(RevokeTimeLimit);
            bw.Write(RevokePmTimeLimit);
            bw.Write(RatingEDecay);
            bw.Write(StickersRecentLimit);
            bw.Write(StickersFavedLimit);
            bw.Write(ChannelsReadMediaPeriod);
            if ((Flags & 1) != 0)
            {
                bw.Write(TmpSessions.Value);
            }
            bw.Write(PinnedDialogsCountMax);
            bw.Write(PinnedInfolderCountMax);
            bw.Write(CallReceiveTimeoutMs);
            bw.Write(CallRingTimeoutMs);
            bw.Write(CallConnectTimeoutMs);
            bw.Write(CallPacketTimeoutMs);
            StringUtil.Serialize(MeUrlPrefix, bw);
            if ((Flags & 128) != 0)
            {
                StringUtil.Serialize(AutoupdateUrlPrefix, bw);
            }
            if ((Flags & 512) != 0)
            {
                StringUtil.Serialize(GifSearchUsername, bw);
            }
            if ((Flags & 1024) != 0)
            {
                StringUtil.Serialize(VenueSearchUsername, bw);
            }
            if ((Flags & 2048) != 0)
            {
                StringUtil.Serialize(ImgSearchUsername, bw);
            }
            if ((Flags & 4096) != 0)
            {
                StringUtil.Serialize(StaticMapsProvider, bw);
            }
            bw.Write(CaptionLengthMax);
            bw.Write(MessageLengthMax);
            bw.Write(WebfileDcId);
            if ((Flags & 4) != 0)
            {
                StringUtil.Serialize(SuggestedLangCode, bw);
            }
            if ((Flags & 4) != 0)
            {
                bw.Write(LangPackVersion.Value);
            }
            if ((Flags & 4) != 0)
            {
                bw.Write(BaseLangPackVersion.Value);
            }
        }
Exemplo n.º 15
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     bw.Write(user_id);
     BoolUtil.Serialize(mutual, bw);
 }
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     BoolUtil.Serialize(Ordered, bw);
     ObjectUtils.SerializeObject(Items, bw);
 }
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     BoolUtil.Serialize(NewValue, bw);
 }