コード例 #1
0
 /// <summary>
 /// Puts down a record header containing the magic code, type of the record, and current DateTime.
 /// </summary>
 /// <param name="binaryRecordVersion">The version of the record.</param>
 /// <param name="logCategory">The log category.</param>
 /// <param name="type">The type of the event.</param>
 /// <param name="author">The author.</param>
 public void WriteRecordHeader(BinaryRecordVersion binaryRecordVersion, LogCategory logCategory, LogMessageType type, string author)
 {
     this.BinaryWriter.Write(StreamHeaderMagicCode);
     this.BinaryWriter.Write((long)BinaryLogWriter.LifetimeId);
     this.BinaryWriter.Write((int)binaryRecordVersion);
     this.BinaryWriter.Write((int)logCategory);
     this.BinaryWriter.Write((long)DateTime.Now.Ticks);
     this.BinaryWriter.Write((int)type);
     this.WriteString(author);
 }
コード例 #2
0
 /// <summary>
 /// Puts down a record header containing the magic code, type of the record, and current DateTime.
 /// </summary>
 /// <param name="binaryRecordVersion">The version of the record.</param>
 /// <param name="logCategory">The log category.</param>
 /// <param name="type">The type of the event.</param>
 /// <param name="author">The author.</param>
 public void WriteRecordHeader(BinaryRecordVersion binaryRecordVersion, LogCategory logCategory, LogMessageType type, string author)
 {
     this.BinaryWriter.Write(StreamHeaderMagicCode);
     this.BinaryWriter.Write((long) BinaryLogWriter.LifetimeId);
     this.BinaryWriter.Write((int) binaryRecordVersion);
     this.BinaryWriter.Write((int) logCategory);
     this.BinaryWriter.Write((long) DateTime.Now.Ticks);
     this.BinaryWriter.Write((int) type);
     this.WriteString( author);
 }