Esempio n. 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;
 }
        /// <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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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;
        }  
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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;
        }