protected override Stream Export(BufferManager bufferManager, int count) { BufferStream bufferStream = new BufferStream(bufferManager); // Nickname if (this.Nickname != null) { ItemUtilities.Write(bufferStream, (byte)SerializeId.Nickname, this.Nickname); } // DigitalSignatureAlgorithm if (this.DigitalSignatureAlgorithm != 0) { ItemUtilities.Write(bufferStream, (byte)SerializeId.DigitalSignatureAlgorithm, this.DigitalSignatureAlgorithm.ToString()); } // PublicKey if (this.PublicKey != null) { ItemUtilities.Write(bufferStream, (byte)SerializeId.PublicKey, this.PublicKey); } // PrivateKey if (this.PrivateKey != null) { ItemUtilities.Write(bufferStream, (byte)SerializeId.PrivateKey, this.PrivateKey); } bufferStream.Seek(0, SeekOrigin.Begin); return(bufferStream); }
protected override Stream Export(BufferManager bufferManager, int count) { BufferStream bufferStream = new BufferStream(bufferManager); // CreationTime if (this.CreationTime != DateTime.MinValue) { ItemUtilities.Write(bufferStream, (byte)SerializeId.CreationTime, this.CreationTime.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ", System.Globalization.DateTimeFormatInfo.InvariantInfo)); } // ExchangeAlgorithm if (this.ExchangeAlgorithm != 0) { ItemUtilities.Write(bufferStream, (byte)SerializeId.ExchangeAlgorithm, this.ExchangeAlgorithm.ToString()); } // PublicKey if (this.PublicKey != null) { ItemUtilities.Write(bufferStream, (byte)SerializeId.PublicKey, this.PublicKey); } // PrivateKey if (this.PrivateKey != null) { ItemUtilities.Write(bufferStream, (byte)SerializeId.PrivateKey, this.PrivateKey); } bufferStream.Seek(0, SeekOrigin.Begin); return(bufferStream); }
protected override Stream Export(BufferManager bufferManager, int count) { BufferStream bufferStream = new BufferStream(bufferManager); // CashAlgorithm if (this.CashAlgorithm != 0) { ItemUtilities.Write(bufferStream, (byte)SerializeId.CashAlgorithm, this.CashAlgorithm.ToString()); } // Key if (this.Key != null) { ItemUtilities.Write(bufferStream, (byte)SerializeId.Key, this.Key); } bufferStream.Seek(0, SeekOrigin.Begin); return(bufferStream); }