/// <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; }
/// <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); }
public static EventRecord FromBson(BsonDocument doc) { var eventDocument = doc.GetBsonDocument("Event"); var record = new EventRecord() { EventDocument = eventDocument, Metadata = EventMetadata.FromBson(eventDocument.GetBsonDocument("Metadata")), Handlers = EventHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers")) }; return(record); }
public static EventRecord FromBson(BsonDocument doc) { var eventDocument = doc.GetBsonDocument("Event"); var record = new EventRecord() { EventDocument = eventDocument, Metadata = EventMetadata.FromBson(eventDocument.GetBsonDocument("Metadata")), Handlers = EventHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers")) }; return record; }
public static CommandRecord FromBson(BsonDocument doc) { var commandDocument = doc.GetBsonDocument("Command"); var record = new CommandRecord { CommandDocument = commandDocument, Metadata = commandDocument.GetBsonDocument("Metadata").CreateCommandMetadata(), Handlers = CommandHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers")) }; return(record); }
public static CommandRecord FromBson(BsonDocument doc) { var commandDocument = doc.GetBsonDocument("Command"); var record = new CommandRecord { CommandDocument = commandDocument, Metadata = CommandMetadata.FromBson(commandDocument.GetBsonDocument("Metadata")), Handlers = CommandHandlerRecordCollection.FromBson(doc.GetBsonArray("Handlers")) }; return record; }