Represent one physical log record
예제 #1
0
 /// <summary>
 /// From BSON
 /// </summary>
 public static LogRecord FromBson(BsonDocument doc)
 {
     var record = new LogRecord();
     record.Command = CommandRecord.FromBson(doc);
     record.Events = EventRecordCollection.FromBson(doc.GetBsonArray("Events"));
     record._errors = record.Command.Handlers.Errors + record.Events.Errors;
     return record;
 }  
예제 #2
0
        /// <summary>
        /// Load record by command ID
        /// </summary>
        public LogRecord GetRecordByCommandId(String commandId)
        {
            var recordDoc = Write.Logs.FindOneAs <BsonDocument>(Query.EQ("_id", commandId));

            return(LogRecord.FromBson(recordDoc));
        }