public void ReadWriteBool() { IValueWriter writer = GetWriter(); writer.WriteBool(true); writer.WriteBool(false); writer.Flush(); IValueReader reader = GetReader(writer); Assert.IsTrue(reader.ReadBool()); Assert.IsFalse(reader.ReadBool()); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { if (writer.WriteBool(Accepted)) { Target.Serialize(context, writer); } }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteString(Name); writer.WriteInt32(Id); writer.WriteInt32(OwnerId); writer.WriteBool(IsMuted); CodecSettings.Serialize(context, writer); }
public override void WritePayload (ISerializationContext context, IValueWriter writer) { if (writer.WriteBool (SenderId != null)) writer.WriteString (SenderId); writer.WriteInt32 (GroupId); writer.WriteString (Text); }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteInt32(this.ChannelId); writer.WriteInt32(this.ParentChannelId); writer.WriteBool(this.ReadOnly); writer.WriteInt32(this.UserLimit); writer.WriteString(this.Name); writer.WriteString(this.Description); }
public void Serialize(IValueWriter writer) { writer.WriteBool (this.NonCharacter); writer.WriteInt32 (this.PlayerID); writer.WriteInt32 (this.path.Count); foreach(Directions dir in this.path) writer.WriteInt32 ((int) dir); }
public void Serialize(ISerializationContext context, IValueWriter writer) { if (!writer.WriteBool(this.publicKey != null)) { return; } writer.WriteBytes(this.publicKey); writer.WriteInt32(this.exponentOffset); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { if (writer.WriteBool(SenderId != null)) { writer.WriteString(SenderId); } writer.WriteInt32(GroupId); writer.WriteString(Text); }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteInt32(UserId); writer.WriteString(Username); writer.WriteInt32(CurrentChannelId); writer.WriteString(Nickname); writer.WriteString(Phonetic); writer.WriteBool(IsMuted); writer.WriteByte((byte)Status); writer.WriteString(Comment); }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteString(Name); writer.WriteString(Description); writer.WriteString(Logo); writer.WriteBool(Passworded); writer.WriteByte((byte)RegistrationMode); if (RegistrationMode != UserRegistrationMode.None) { writer.WriteString(RegistrationContent); } }
private void SerializableSerializer(IValueWriter writer, object value) { if (this.type.IsClass) { writer.WriteBool(value == null); } using (MemoryStream stream = new MemoryStream()) { new BinaryFormatter().Serialize(stream, value); writer.WriteBytes(stream.ToArray()); } }
public void Serialize(ISerializationContext context, IValueWriter writer, IAsymmetricCrypto crypto) { if (!writer.WriteBool(this.publicKey != null)) { return; } writer.WriteBytes(crypto.Encrypt(Exponent)); int first = this.Modulus.Length / 2; writer.WriteBytes(crypto.Encrypt(Modulus.Copy(0, first))); writer.WriteBytes(crypto.Encrypt(Modulus.Copy(first, Modulus.Length - first))); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { if (writer.WriteBool(SignatureHashAlgorithms != null)) { string[] algs = SignatureHashAlgorithms.ToArray(); writer.WriteInt32(algs.Length); for (int i = 0; i < algs.Length; ++i) { writer.WriteString(algs[i]); } } Protocol[] protocols = Protocols.ToArray(); writer.WriteInt32(protocols.Length); for (int i = 0; i < protocols.Length; ++i) { protocols[i].Serialize(context, writer); } }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool (Removing); BanInfo.Serialize (context, writer); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool(Removing); BanInfo.Serialize(context, writer); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool (this.Unmuted); writer.WriteInt32 (this.SourceId); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool (this.IsActive); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool(this.Starting); writer.WriteInt32(this.SourceId); }
public void Serialize(IValueWriter writer, IPublicKeyCrypto crypto) { if (writer.WriteBool (D != null)) { writer.WriteBytes (crypto.Encrypt (D)); writer.WriteBytes (crypto.Encrypt (DP)); writer.WriteBytes (crypto.Encrypt (DQ)); writer.WriteBytes (crypto.Encrypt (InverseQ)); writer.WriteBytes (crypto.Encrypt (P)); writer.WriteBytes (crypto.Encrypt (Q)); } if (writer.WriteBool (this.publicKey != null)) { writer.WriteBytes (crypto.Encrypt (Exponent)); int first = Modulus.Length / 2; writer.WriteBytes (crypto.Encrypt (Modulus.Copy (0, first))); writer.WriteBytes (crypto.Encrypt (Modulus.Copy (first, Modulus.Length - first))); } }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteInt32 (UserId); writer.WriteString (Username); writer.WriteInt32 (CurrentChannelId); writer.WriteString (Nickname); writer.WriteString (Phonetic); writer.WriteBool (IsMuted); writer.WriteByte ((byte)Status); writer.WriteString (Comment); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool (this.ServerInfoOnly); }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteInt32((int)Name); writer.WriteInt32(ChannelId); writer.WriteBool(IsAllowed); }
public void Serialize(IValueWriter writer, RSACrypto crypto) { if (!writer.WriteBool (this.publicKey != null)) return; writer.WriteBytes (crypto.Encrypt (this.Exponent)); int first = this.Modulus.Length / 2; writer.WriteBytes (crypto.Encrypt (this.Modulus.Copy (0, first))); writer.WriteBytes (crypto.Encrypt (this.Modulus.Copy (first, this.Modulus.Length - first))); }
public void Serialize(ISerializationContext context, IValueWriter writer) { if (!writer.WriteBool (this.publicKey != null)) return; writer.WriteBytes (this.publicKey); writer.WriteInt32 (this.exponentOffset); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteInt32 (UserId); writer.WriteString (Username); writer.WriteBool (Approved); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { if (writer.WriteBool (SignatureHashAlgorithms != null)) { string[] algs = SignatureHashAlgorithms.ToArray(); writer.WriteInt32 (algs.Length); for (int i = 0; i < algs.Length; ++i) writer.WriteString (algs[i]); } Protocol[] protocols = Protocols.ToArray(); writer.WriteInt32 (protocols.Length); for (int i = 0 ; i < protocols.Length; ++i) protocols[i].Serialize (context, writer); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteInt32(UserId); writer.WriteString(Username); writer.WriteBool(Approved); }
public void Serialize(ISerializationContext context, IValueWriter writer, IAsymmetricCrypto crypto) { if (!writer.WriteBool (this.publicKey != null)) return; writer.WriteBytes (crypto.Encrypt (Exponent)); int first = this.Modulus.Length / 2; writer.WriteBytes (crypto.Encrypt (Modulus.Copy (0, first))); writer.WriteBytes (crypto.Encrypt (Modulus.Copy (first, Modulus.Length - first))); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool(this.ServerInfoOnly); }
public void Serialize(ISerializationContext context, IValueWriter writer) { if (writer.WriteBool (D != null)) { writer.WriteBytes (D); writer.WriteBytes (DP); writer.WriteBytes (DQ); writer.WriteBytes (InverseQ); writer.WriteBytes (P); writer.WriteBytes (Q); } if (writer.WriteBool (this.publicKey != null)) { writer.WriteBytes (this.publicKey); writer.WriteInt32 (this.exponentOffset); } }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { this.channel.Serialize(context, writer); writer.WriteBool(Delete); writer.WriteBool(MakeDefault); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool(this.Unmuted); writer.WriteInt32(this.UserId); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteByte ((byte) Result); writer.WriteBool (KeyboardEncryption); writer.WriteBool (MouseEncryption); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { this.channel.Serialize (context, writer); writer.WriteBool (Delete); writer.WriteBool (MakeDefault); }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteString (Name); writer.WriteString (Description); writer.WriteString (Logo); writer.WriteBool (Passworded); writer.WriteByte ((byte)RegistrationMode); if (RegistrationMode != UserRegistrationMode.None) writer.WriteString (RegistrationContent); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool (FromServer); writer.WriteInt32 (UserId); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteInt32(UserId); writer.WriteBool(FromServer); }
public void Serialize(ISerializationContext context, IValueWriter writer) { writer.WriteInt32 (this.ChannelId); writer.WriteInt32 (this.ParentChannelId); writer.WriteBool (this.ReadOnly); writer.WriteInt32 (this.UserLimit); writer.WriteString (this.Name); writer.WriteString (this.Description); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { writer.WriteBool(ready); }
public override void WritePayload(ISerializationContext context, IValueWriter writer) { if (writer.WriteBool (Accepted)) Target.Serialize (context, writer); }
protected void WriteBool(TelemetryId id, bool value) { valueWriter.WriteBool(id, value); }